Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit dae48638 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

refactoring: heavy lorry declaration data adapter: implement methods in base...

refactoring: heavy lorry declaration data adapter: implement methods in base class, get component data adapter via property implemented in derived class
refactoring: extract interfaces of data adapter in separate files
start implementation primary bus (PEV E2)
parent 77d9839b
No related branches found
No related tags found
No related merge requests found
Showing
with 507 additions and 780 deletions
......@@ -5,6 +5,7 @@ using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.SimulationComponent;
......@@ -12,7 +13,7 @@ using TUGraz.VectoCore.Models.SimulationComponent.Data;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.CompletedBus.Generic
{
public abstract class DeclarationDeclarationDataAdapterGenericCompletedBusDeclaration
public abstract class DeclarationDeclarationDataAdapterGenericCompletedBusDeclaration
{
public abstract class CompletedBusDeclarationBase : IGenericCompletedBusDeclarationDataAdapter
{
......
......@@ -9,6 +9,7 @@ using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces;
using TUGraz.VectoCore.Models.BusAuxiliaries;
using TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.Electrics;
using TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.Pneumatics;
......@@ -19,7 +20,7 @@ using TUGraz.VectoCore.Models.SimulationComponent.Data;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.CompletedBus.Specific
{
public abstract class DeclarationDataAdapterSpecificCompletedBus
public abstract class DeclarationDataAdapterSpecificCompletedBus
{
public abstract class CompletedBusDeclarationBase : AbstractSimulationDataAdapter, ISpecificCompletedBusDeclarationDataAdapter
{
......
......@@ -94,7 +94,6 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
GearboxData gearboxData,
CombustionEngineData engineData,
ArchitectureID archId);
ShiftStrategyParameters CreateDummyGearshiftStrategy();
}
public interface IPrimaryBusDeclarationDataAdapter : IDeclarationDataAdapter
......@@ -115,7 +114,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
//RetarderData CreateRetarderData(IRetarderInputData retarderData);
//PTOData CreatePTOTransmissionData(IPTOTransmissionInputData ptoData);
ShiftStrategyParameters CreateGearshiftData(GearboxData gbx, double axleRatio, PerSecond engineIdlingSpeed);
ShiftStrategyParameters CreateGearshiftData(double axleRatio, PerSecond engineIdlingSpeed,
GearboxType gearboxType, int gearsCount);
//VehicleData CreateVehicleData(IVehicleDeclarationInputData vehicle, Segment segment, Mission mission,
// KeyValuePair<LoadingType, Tuple<Kilogram, double?>> loading, bool allowVocational);
......
using System;
using System.Collections.Generic;
using System.Linq;
using TUGraz.VectoCommon.BusAuxiliaries;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents;
using TUGraz.VectoCore.Models.BusAuxiliaries;
using TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.Electrics;
using TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.HVAC;
using TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.Pneumatics;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.SimulationComponent;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data.ElectricComponents.Battery;
using TUGraz.VectoCore.Models.SimulationComponent.Impl;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
{
public abstract class DeclarationDataAdapterPrimaryBus
public abstract class DeclarationDataAdapterPrimaryBus
{
public abstract class PrimaryBusBase : IPrimaryBusDeclarationDataAdapter
{
......@@ -37,7 +31,12 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
protected readonly IRetarderDataAdapter _retarderDataAdapter = new RetarderDataAdapter();
protected readonly IAirdragDataAdapter _airdragDataAdapter = new AirdragDataAdapter();
private readonly IAngledriveDataAdapter _angledriveDataAdapter = new AngledriveDataAdapter();
private readonly IEngineDataAdapter _engineDataAdapter = new CombustionEngineComponentDataAdapter();
protected abstract IEngineDataAdapter EngineDataAdapter { get; }
protected abstract IGearboxDataAdapter GearboxDataAdapter { get; }
protected virtual IElectricMachinesDataAdapter ElectricMachinesDataAdapter => throw new NotImplementedException();
public DriverData CreateDriverData(Segment segment)
{
......@@ -56,12 +55,6 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
return _airdragDataAdapter.CreateAirdragData(airdragData, mission, segment);
}
public virtual IList<Tuple<PowertrainPosition, ElectricMotorData>> CreateElectricMachines(IElectricMachinesDeclarationInputData electricMachines, IDictionary<PowertrainPosition, IList<Tuple<Volt, TableData>>> torqueLimits,
Volt averageVoltage, GearList gears = null)
{
throw new NotImplementedException();
}
public abstract void CreateREESSData(IElectricStorageSystemDeclarationInputData componentsElectricStorage,
VectoSimulationJobType jobType, bool ovc, Action<BatterySystemData> setBatteryData, Action<SuperCapData> setSuperCapData);
......@@ -78,18 +71,19 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
public virtual CombustionEngineData CreateEngineData(IVehicleDeclarationInputData vehicle, IEngineModeDeclarationInputData engineMode,
Mission mission)
{
throw new NotImplementedException();
return EngineDataAdapter.CreateEngineData(vehicle, engineMode, mission);
}
public virtual GearboxData CreateGearboxData(IVehicleDeclarationInputData inputData, VectoRunData runData,
IShiftPolygonCalculator shiftPolygonCalc)
{
throw new NotImplementedException();
return GearboxDataAdapter.CreateGearboxData(inputData, runData, shiftPolygonCalc, SupportedGearboxTypes);
}
public virtual ShiftStrategyParameters CreateGearshiftData(GearboxData gbx, double axleRatio, PerSecond engineIdlingSpeed)
public virtual ShiftStrategyParameters CreateGearshiftData(double axleRatio, PerSecond engineIdlingSpeed,
GearboxType gearboxType, int gearsCount)
{
throw new NotImplementedException();
return GearboxDataAdapter.CreateGearshiftData(axleRatio, engineIdlingSpeed, gearboxType, gearsCount);
}
......@@ -98,9 +92,16 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
return _retarderDataAdapter.CreateRetarderData(retarderData, position);
}
public virtual IList<Tuple<PowertrainPosition, ElectricMotorData>> CreateElectricMachines(IElectricMachinesDeclarationInputData electricMachines, IDictionary<PowertrainPosition, IList<Tuple<Volt, TableData>>> torqueLimits,
Volt averageVoltage, GearList gears = null)
{
return ElectricMachinesDataAdapter.CreateElectricMachines(electricMachines, torqueLimits, averageVoltage, gears);
}
public virtual List<Tuple<PowertrainPosition, ElectricMotorData>> CreateIEPCElectricMachines(IIEPCDeclarationInputData iepc, Volt averageVoltage)
{
throw new NotImplementedException();
return ElectricMachinesDataAdapter.CreateIEPCElectricMachines(iepc, averageVoltage);
}
public virtual IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxData,
......@@ -134,65 +135,36 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
public class Conventional : PrimaryBusBase
{
protected IEngineDataAdapter _engineDataAdapter = new CombustionEngineComponentDataAdapter();
protected IGearboxDataAdapter _gearboxDataAdapter = new GearboxDataAdapter(new TorqueConverterDataAdapter());
protected readonly IPrimaryBusAuxiliaryDataAdapter _auxDataAdapter = new PrimaryBusAuxiliaryDataAdapter();
#region Overrides of PrimaryBusBase
protected override IEngineDataAdapter EngineDataAdapter { get; } = new CombustionEngineComponentDataAdapter();
#region Overrides of PrimaryBusBase
protected override IGearboxDataAdapter GearboxDataAdapter { get; } = new GearboxDataAdapter(new TorqueConverterDataAdapter());
protected override IPrimaryBusAuxiliaryDataAdapter AuxDataAdapter { get; } = new PrimaryBusAuxiliaryDataAdapter();
public override void CreateREESSData(IElectricStorageSystemDeclarationInputData componentsElectricStorage,
VectoSimulationJobType jobType, bool ovc, Action<BatterySystemData> setBatteryData, Action<SuperCapData> setSuperCapData)
{
throw new NotImplementedException();
}
public override CombustionEngineData CreateEngineData(IVehicleDeclarationInputData vehicle, IEngineModeDeclarationInputData engineMode,
Mission mission)
{
return _engineDataAdapter.CreateEngineData(vehicle, engineMode, mission);
}
public override GearboxData CreateGearboxData(IVehicleDeclarationInputData inputData, VectoRunData runData,
IShiftPolygonCalculator shiftPolygonCalc)
{
return _gearboxDataAdapter.CreateGearboxData(inputData, runData, shiftPolygonCalc, SupportedGearboxTypes);
}
public override ShiftStrategyParameters CreateGearshiftData(GearboxData gbx, double axleRatio, PerSecond engineIdlingSpeed)
{
return _gearboxDataAdapter.CreateGearshiftData(axleRatio, engineIdlingSpeed, gbx.Type, gbx.Gears.Count);
}
protected override IPrimaryBusAuxiliaryDataAdapter AuxDataAdapter => _auxDataAdapter;
#endregion
}
public abstract class Hybrid : PrimaryBusBase
{
private CombustionEngineComponentDataAdapter _engineDataAdapter = new CombustionEngineComponentDataAdapter();
private ElectricMachinesDataAdapter _electricMachinesDataAdapter = new ElectricMachinesDataAdapter();
private ElectricStorageAdapter _eletricStorageAdapter = new ElectricStorageAdapter();
protected readonly IPrimaryBusAuxiliaryDataAdapter _auxDataAdapter = new PrimaryBusAuxiliaryDataAdapter();
#region Overrides of PrimaryBusBase
public override CombustionEngineData CreateEngineData(IVehicleDeclarationInputData vehicle, IEngineModeDeclarationInputData engineMode,
Mission mission)
{
return _engineDataAdapter.CreateEngineData(vehicle, engineMode, mission);
}
protected override IEngineDataAdapter EngineDataAdapter { get; } = new CombustionEngineComponentDataAdapter();
protected override IElectricMachinesDataAdapter ElectricMachinesDataAdapter { get; } = new ElectricMachinesDataAdapter();
public override IList<Tuple<PowertrainPosition, ElectricMotorData>> CreateElectricMachines(
IElectricMachinesDeclarationInputData electricMachines,
IDictionary<PowertrainPosition, IList<Tuple<Volt, TableData>>> torqueLimits, Volt averageVoltage,
GearList gears = null)
{
return _electricMachinesDataAdapter.CreateElectricMachines(electricMachines, torqueLimits, averageVoltage,
gears);
}
public override void CreateREESSData(IElectricStorageSystemDeclarationInputData componentsElectricStorage,
VectoSimulationJobType jobType, bool ovc, Action<BatterySystemData> setBatteryData, Action<SuperCapData> setSuperCapData)
......@@ -223,11 +195,13 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
public abstract class SerialHybrid : Hybrid
{
protected override IGearboxDataAdapter GearboxDataAdapter => throw new NotImplementedException();
}
public class HEV_S2 : SerialHybrid
{
protected override IGearboxDataAdapter GearboxDataAdapter { get; } = new GearboxDataAdapter(new TorqueConverterDataAdapter());
}
......@@ -243,24 +217,19 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
public class HEV_S_IEPC : SerialHybrid
{
protected override IGearboxDataAdapter GearboxDataAdapter { get; } = new IEPCGearboxDataAdapter();
}
public abstract class ParallelHybrid : Hybrid
{
private GearboxDataAdapter _gearboxDataAdapter = new GearboxDataAdapter(new TorqueConverterDataAdapter());
public override GearboxData CreateGearboxData(IVehicleDeclarationInputData inputData, VectoRunData runData,
IShiftPolygonCalculator shiftPolygonCalc)
{
return _gearboxDataAdapter.CreateGearboxData(inputData, runData, shiftPolygonCalc,
supportedGearboxTypes: SupportedGearboxTypes);
}
#region Overrides of PrimaryBusBase
public override ShiftStrategyParameters CreateGearshiftData(GearboxData gbx, double axleRatio, PerSecond engineIdlingSpeed)
{
throw new NotImplementedException();
//return _gearboxDataAdapter.CreateGearshiftData(gbx, axleRatio, engineIdlingSpeed, gbx.Type, gbx.Gears.Count);
}
protected override IGearboxDataAdapter GearboxDataAdapter { get; } = new GearboxDataAdapter(new TorqueConverterDataAdapter());
#endregion
}
public class HEV_P1 : ParallelHybrid
......@@ -290,17 +259,22 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
public abstract class BatteryElectric : PrimaryBusBase
{
private readonly GearboxDataAdapter _gearboxDataAdapter = new GearboxDataAdapter(null);
private readonly ElectricStorageAdapter _electricStorageAdapter = new ElectricStorageAdapter();
private readonly ElectricMachinesDataAdapter _electricMachineAdapter = new ElectricMachinesDataAdapter();
protected readonly IPrimaryBusAuxiliaryDataAdapter _auxDataAdapter = new PrimaryBusPEVAuxiliaryDataAdapter();
public override IList<Tuple<PowertrainPosition, ElectricMotorData>> CreateElectricMachines(IElectricMachinesDeclarationInputData electricMachines, IDictionary<PowertrainPosition, IList<Tuple<Volt, TableData>>> torqueLimits,
Volt averageVoltage, GearList gears = null)
{
return _electricMachineAdapter.CreateElectricMachines(electricMachines, torqueLimits, averageVoltage, gears);
}
#region Overrides of PrimaryBusBase
protected override IEngineDataAdapter EngineDataAdapter => throw new NotImplementedException();
protected override IGearboxDataAdapter GearboxDataAdapter { get; } = new GearboxDataAdapter(null);
protected override IElectricMachinesDataAdapter ElectricMachinesDataAdapter { get; } = new ElectricMachinesDataAdapter();
protected override IPrimaryBusAuxiliaryDataAdapter AuxDataAdapter => _auxDataAdapter;
#endregion
public override void CreateREESSData(IElectricStorageSystemDeclarationInputData componentsElectricStorage,
VectoSimulationJobType jobType, bool ovc, Action<BatterySystemData> setBatteryData, Action<SuperCapData> setSuperCapData)
......@@ -318,14 +292,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
if (superCapData != null) {
throw new VectoException("Supercaps are not allowed for PEVs");
}
}
#region Overrides of PrimaryBusBase
protected override IPrimaryBusAuxiliaryDataAdapter AuxDataAdapter => _auxDataAdapter;
#endregion
}
......@@ -356,6 +324,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
{
#region Overrides of PrimaryBusBase
protected override IEngineDataAdapter EngineDataAdapter => throw new NotImplementedException();
public override VehicleData CreateVehicleData(IVehicleDeclarationInputData vehicle, Segment segment, Mission mission,
KeyValuePair<LoadingType, Tuple<Kilogram, double?>> loading, bool allowVocational)
{
......@@ -368,7 +338,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
throw new NotImplementedException();
}
protected override IPrimaryBusAuxiliaryDataAdapter AuxDataAdapter { get; }
protected override IPrimaryBusAuxiliaryDataAdapter AuxDataAdapter => throw new NotImplementedException();
protected override IGearboxDataAdapter GearboxDataAdapter => throw new NotImplementedException();
#endregion
}
......
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents
{
public interface IADASDataAdapter
{
VehicleData.ADASData CreateADAS(IAdvancedDriverAssistantSystemDeclarationInputData adas);
}
public class ADASDataAdapter : IADASDataAdapter
public class ADASDataAdapter : IADASDataAdapter
{
public VehicleData.ADASData CreateADAS(IAdvancedDriverAssistantSystemDeclarationInputData adas)
......
......@@ -8,22 +8,14 @@ using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents
{
public interface IAirdragDataAdapter
{
AirdragData CreateAirdragData(
IAirdragDeclarationInputData airdragInputData, Mission mission,
Segment segment);
AirdragData CreateAirdragData(IVehicleDeclarationInputData completedVehicle, Mission mission);
}
public static class AirdragDataAdapterHelper
public static class AirdragDataAdapterHelper
{
public static List<CrossWindCorrectionCurveReader.CrossWindCorrectionEntry> GetDeclarationAirResistanceCurve(
string crosswindCorrectionParameters, SquareMeter aerodynamicDragAera, Meter vehicleHeight)
......
......@@ -4,19 +4,14 @@ using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces;
using TUGraz.VectoCore.Models.GenericModelData;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents
{
public interface IAngledriveDataAdapter
{
AngledriveData CreateAngledriveData(IAngledriveInputData data, bool useEfficiencyFallback);
AngledriveData CreateAngledriveData(IAngledriveInputData data);
}
public class AngledriveDataAdapter : IAngledriveDataAdapter
public class AngledriveDataAdapter : IAngledriveDataAdapter
{
public AngledriveData CreateAngledriveData(IAngledriveInputData data, bool useEfficiencyFallback)
{
......
......@@ -9,6 +9,7 @@ using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces;
using TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.HeavyLorryRunDataFactory;
using TUGraz.VectoCore.Models.BusAuxiliaries;
using TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.Electrics;
......@@ -22,27 +23,9 @@ using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents
{
public interface IAuxiliaryDataAdapter
{
IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxInputData,
IBusAuxiliariesDeclarationData busAuxData, MissionType mission, VehicleClass hvdClass, Meter vehicleLength,
int? numSteeredAxles, VectoSimulationJobType jobType);
}
public interface ICompletedBusAuxiliaryDataAdapter : IPrimaryBusAuxiliaryDataAdapter
{
IAuxiliaryConfig CreateBusAuxiliariesData(Mission mission, IVehicleDeclarationInputData primaryVehicle,
IVehicleDeclarationInputData completedVehicle, VectoRunData runData);
}
public interface IPrimaryBusAuxiliaryDataAdapter : IAuxiliaryDataAdapter
{
AuxiliaryConfig CreateBusAuxiliariesData(Mission mission, IVehicleDeclarationInputData primaryVehicle, VectoRunData runData);
}
public abstract class AuxiliaryDataAdapter : ComponentDataAdapterBase, IAuxiliaryDataAdapter
public abstract class AuxiliaryDataAdapter : ComponentDataAdapterBase, IAuxiliaryDataAdapter
{
public class ElectricConsumerEntry
{
......@@ -553,7 +536,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen
KneelingHeight = VectoMath.Max(0.SI<Meter>(), mission.BusParameter.EntranceHeight - Constants.BusParameters.EntranceHeight),
CompressorGearEfficiency = Constants.BusAuxiliaries.PneumaticUserConfig.CompressorGearEfficiency,
CompressorGearRatio = busAux.PneumaticSupply.Ratio,
CompressorMap = DeclarationData.BusAuxiliaries.GetCompressorMap(busAux.PneumaticSupply.CompressorSize, busAux.PneumaticSupply.Clutch),
CompressorMap = DeclarationData.BusAuxiliaries.GetCompressorMap(busAux.PneumaticSupply),
SmartAirCompression = busAux.PneumaticSupply.SmartAirCompression,
SmartRegeneration = busAux.PneumaticSupply.SmartRegeneration,
AdBlueDosing = busAux.PneumaticConsumers.AdBlueDosing,
......@@ -821,10 +804,14 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen
ssmHeating.ElectricHeater = GetElectricHeater(mission, runData);
ssmHeating.HeatingDistributions = DeclarationData.BusAuxiliaries.HeatingDistributionCases;
var electricUserInputs =
GetElectricalUserConfig(mission, primaryVehicle, actuations, runData.VehicleData.VehicleClass);
electricUserInputs.ConnectESToREESS = true;
var retVal = new AuxiliaryConfig
{
InputData = primaryVehicle.Components.BusAuxiliaries,
ElectricalUserInputsConfig = GetElectricalUserConfig(mission, primaryVehicle, actuations, runData.VehicleData.VehicleClass),
ElectricalUserInputsConfig = electricUserInputs,
PneumaticUserInputsConfig = GetPneumaticUserConfig(primaryVehicle, mission),
PneumaticAuxillariesConfig = CreatePneumaticAuxConfig(runData.Retarder.Type),
Actuations = actuations,
......@@ -1102,11 +1089,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen
{
return new PneumaticUserInputsConfig
{
CompressorMap = completedVehicle.VehicleType == VectoSimulationJobType.BatteryElectricVehicle
? null
: DeclarationData.BusAuxiliaries.GetCompressorMap(
primaryBusAuxiliaries.PneumaticSupply.CompressorSize,
primaryBusAuxiliaries.PneumaticSupply.Clutch),
CompressorMap = DeclarationData.BusAuxiliaries.GetCompressorMap(primaryBusAuxiliaries.PneumaticSupply),
CompressorGearEfficiency = Constants.BusAuxiliaries.PneumaticUserConfig.CompressorGearEfficiency,
CompressorGearRatio = completedVehicle.VehicleType == VectoSimulationJobType.BatteryElectricVehicle
? 0 : primaryBusAuxiliaries.PneumaticSupply.Ratio,
......
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces;
using TUGraz.VectoCore.Models.GenericModelData;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents
{
public interface IAxleGearDataAdapter
{
AxleGearData CreateAxleGearData(IAxleGearInputData data);
AxleGearData CreateDummyAxleGearData(IGearboxDeclarationInputData gbxData);
}
public class AxleGearDataAdapter : IAxleGearDataAdapter
public class AxleGearDataAdapter : IAxleGearDataAdapter
{
public AxleGearData CreateDummyAxleGearData(IGearboxDeclarationInputData gbxData)
{
......
using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents
{
public interface IDriverDataAdapter
{
DriverData CreateDriverData(Segment segment);
}
internal abstract class DriverDataAdapter : IDriverDataAdapter
internal abstract class DriverDataAdapter : IDriverDataAdapter
{
protected DriverDataAdapter() { }
......
......@@ -6,6 +6,7 @@ using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.SimulationComponent;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
......@@ -13,14 +14,7 @@ using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents
{
public interface IEngineDataAdapter
{
CombustionEngineData CreateEngineData(IVehicleDeclarationInputData primaryVehicle,
IEngineModeDeclarationInputData mode, Mission mission);
CombustionEngineData CreateEngineData(IVehicleDeclarationInputData primaryVehicle, int modeIdx, Mission mission);
}
public abstract class EngineComponentDataAdapter : ComponentDataAdapterBase, IEngineDataAdapter
public abstract class EngineComponentDataAdapter : ComponentDataAdapterBase, IEngineDataAdapter
{
internal static EngineFullLoadCurve IntersectFullLoadCurves(EngineFullLoadCurve engineCurve, NewtonMeter maxTorque)
{
......
......@@ -9,6 +9,7 @@ using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.Impl;
using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces;
using TUGraz.VectoCore.InputData.Reader.ShiftStrategy;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
......@@ -19,16 +20,7 @@ using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents
{
public interface IGearboxDataAdapter
{
GearboxData CreateGearboxData(IVehicleDeclarationInputData inputData, VectoRunData runData,
IShiftPolygonCalculator shiftPolygonCalculator, GearboxType[] supportedGearboxTypes);
ShiftStrategyParameters CreateGearshiftData(double axleRatio,
PerSecond engineIdlingSpeed, GearboxType gearboxType, int gearsCount);
}
public abstract class GearboxDataAdapterBase : ComponentDataAdapterBase, IGearboxDataAdapter
public abstract class GearboxDataAdapterBase : ComponentDataAdapterBase, IGearboxDataAdapter
{
#region Helper
protected internal static NewtonMeter GbxMaxTorque(
......
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces
{
public interface IADASDataAdapter
{
VehicleData.ADASData CreateADAS(IAdvancedDriverAssistantSystemDeclarationInputData adas);
}
}
\ No newline at end of file
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces
{
public interface IAirdragDataAdapter
{
AirdragData CreateAirdragData(
IAirdragDeclarationInputData airdragInputData, Mission mission,
Segment segment);
AirdragData CreateAirdragData(IVehicleDeclarationInputData completedVehicle, Mission mission);
}
}
\ No newline at end of file
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces
{
public interface IAngledriveDataAdapter
{
AngledriveData CreateAngledriveData(IAngledriveInputData data, bool useEfficiencyFallback);
AngledriveData CreateAngledriveData(IAngledriveInputData data);
}
}
\ No newline at end of file
using System.Collections.Generic;
using TUGraz.VectoCommon.BusAuxiliaries;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.BusAuxiliaries;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces
{
public interface IAuxiliaryDataAdapter
{
IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxInputData,
IBusAuxiliariesDeclarationData busAuxData, MissionType mission, VehicleClass hvdClass, Meter vehicleLength,
int? numSteeredAxles, VectoSimulationJobType jobType);
}
public interface ICompletedBusAuxiliaryDataAdapter : IPrimaryBusAuxiliaryDataAdapter
{
IAuxiliaryConfig CreateBusAuxiliariesData(Mission mission, IVehicleDeclarationInputData primaryVehicle,
IVehicleDeclarationInputData completedVehicle, VectoRunData runData);
}
public interface IPrimaryBusAuxiliaryDataAdapter : IAuxiliaryDataAdapter
{
AuxiliaryConfig CreateBusAuxiliariesData(Mission mission, IVehicleDeclarationInputData primaryVehicle, VectoRunData runData);
}
}
\ No newline at end of file
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces
{
public interface IAxleGearDataAdapter
{
AxleGearData CreateAxleGearData(IAxleGearInputData data);
AxleGearData CreateDummyAxleGearData(IGearboxDeclarationInputData gbxData);
}
}
\ No newline at end of file
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces
{
public interface IDriverDataAdapter
{
DriverData CreateDriverData(Segment segment);
}
}
\ No newline at end of file
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