diff --git a/Documentation/User Manual Source/Release Notes Vecto3.x.pdf b/Documentation/User Manual Source/Release Notes Vecto3.x.pdf index 74bec95204e1b0f68a0d0b3e6b1e6c4f8992623e..906db37b2927947441b6d7ccc8f139fd5d9f83c8 100644 Binary files a/Documentation/User Manual Source/Release Notes Vecto3.x.pdf and b/Documentation/User Manual Source/Release Notes Vecto3.x.pdf differ diff --git a/VECTO/GUI/VectoJobForm.vb b/VECTO/GUI/VectoJobForm.vb index a4ee5cd706f11a4c561bb0d50f954f1357b12d0f..3b6938683f9d4fe98a8681efcb457395535a86aa 100644 --- a/VECTO/GUI/VectoJobForm.vb +++ b/VECTO/GUI/VectoJobForm.vb @@ -604,10 +604,10 @@ Public Class VectoJobForm GetRelativePath(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup.Source, _basePath)) End If - tbEngineStopStartActivationDelay.Text = If(driver.EngineStopStartData?.ActivationDelay?.ToGUIFormat(), DeclarationData.Driver.EngineStopStart.ActivationDelay.ToGUIFormat()) - tbMaxEngineOffTimespan.Text = If(driver.EngineStopStartData?.MaxEngineOffTimespan?.ToGUIFormat(), DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan.ToGUIFormat()) - tbEssUtility.Text = If(driver.EngineStopStartData?.UtilityFactorStandstill.ToGUIFormat(), DeclarationData.Driver.EngineStopStart.UtilityFactor.ToGUIFormat()) - tbESSUtilityFactorDriving.Text = If(driver.EngineStopStartData?.UtilityFactorDriving.ToGUIFormat(), DeclarationData.Driver.EngineStopStart.UtilityFactor.ToGUIFormat()) + tbEngineStopStartActivationDelay.Text = If(driver.EngineStopStartData?.ActivationDelay?.ToGUIFormat(), DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay.ToGUIFormat()) + tbMaxEngineOffTimespan.Text = If(driver.EngineStopStartData?.MaxEngineOffTimespan?.ToGUIFormat(), DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan.ToGUIFormat()) + tbEssUtility.Text = If(driver.EngineStopStartData?.UtilityFactorStandstill.ToGUIFormat(), DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor.ToGUIFormat()) + tbESSUtilityFactorDriving.Text = If(driver.EngineStopStartData?.UtilityFactorDriving.ToGUIFormat(), DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor.ToGUIFormat()) tbEcoRollActivationDelay.Text = If(driver.EcoRollData?.ActivationDelay?.ToGUIFormat(), DeclarationData.Driver.EcoRoll.ActivationDelay.ToGUIFormat()) tbEcoRollMinSpeed.Text = If(driver.EcoRollData?.MinSpeed?.AsKmph().ToGUIFormat(), DeclarationData.Driver.EcoRoll.MinSpeed.AsKmph().ToGUIFormat()) diff --git a/Vecto3GUI2020Test/ViewModelTests/JobListViewModelTests.cs b/Vecto3GUI2020Test/ViewModelTests/JobListViewModelTests.cs index d0bf852cdb71a89e7cf8e3468d95ea6f8110a3e3..80eefb590512fb0adcf3d3c9aabbeaf92cc90bfe 100644 --- a/Vecto3GUI2020Test/ViewModelTests/JobListViewModelTests.cs +++ b/Vecto3GUI2020Test/ViewModelTests/JobListViewModelTests.cs @@ -6,7 +6,6 @@ using Moq; using Ninject; using NUnit.Framework; using NUnit.Framework.Internal; -using OpenQA.Selenium; using VECTO3GUI2020.Helper; using VECTO3GUI2020.ViewModel; using VECTO3GUI2020.ViewModel.Implementation; diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs index 81b0596532da6a4f2f31b8c0f181689467a9f776..f8f5a7085a4f22abb86304d2ffa7143f112be37d 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs @@ -825,11 +825,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON ? null : Body.GetEx<double>("EngineStopStartMaxOffTimespan").SI<Second>(), UtilityFactorStandstill = Body["EngineStopStartUtilityFactor"] == null - ? DeclarationData.Driver.EngineStopStart.UtilityFactor + ? DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor : Body.GetEx<double>("EngineStopStartUtilityFactor"), UtilityFactorDriving = Body["EngineStopStartUtilityFactorDriving"] == null ? (Body["EngineStopStartUtilityFactor"] == null - ? DeclarationData.Driver.EngineStopStart.UtilityFactor + ? DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor : Body.GetEx<double>("EngineStopStartUtilityFactor")) : Body.GetEx<double>("EngineStopStartUtilityFactorDriving"), ActivationDelay = Body["EngineStopStartAtVehicleStopThreshold"] == null diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringEngineStopStartDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringEngineStopStartDataProvider.cs index a85532b12d1c37fe20ba40acb3b8a88915fac2ce..ae4be20c26ae24d8fac53d62888e2690f60495f5 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringEngineStopStartDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringEngineStopStartDataProvider.cs @@ -17,13 +17,13 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider { public XMLEngineeringEngineStopStartDataProviderV10(IXMLEngineeringDriverData driverData, XmlNode node) : base(node) { } - public virtual Second ActivationDelay => GetDouble("ActivationDelay", DeclarationData.Driver.EngineStopStart.ActivationDelay.Value()).SI<Second>(); + public virtual Second ActivationDelay => GetDouble("ActivationDelay", DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay.Value()).SI<Second>(); - public virtual Second MaxEngineOffTimespan => GetDouble("MaxEngineOffTime", DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan.Value()).SI<Second>(); + public virtual Second MaxEngineOffTimespan => GetDouble("MaxEngineOffTime", DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan.Value()).SI<Second>(); - public virtual double UtilityFactorStandstill => GetDouble("UtilityFactor", DeclarationData.Driver.EngineStopStart.UtilityFactor); + public virtual double UtilityFactorStandstill => GetDouble("UtilityFactor", DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor); - public double UtilityFactorDriving => GetDouble("UtilityFactorDriving", DeclarationData.Driver.EngineStopStart.UtilityFactor); + public double UtilityFactorDriving => GetDouble("UtilityFactorDriving", DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor); protected XNamespace SchemaNamespace => NAMESPACE_URI; } diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Generic/DeclarationDataAdapterGenericCompletedBus.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Generic/DeclarationDataAdapterGenericCompletedBus.cs index dc163bf8372a19f389a5913425d3f5c74a11f00e..995657d34f499d09c251757d5aeae66d910c89e2 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Generic/DeclarationDataAdapterGenericCompletedBus.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Generic/DeclarationDataAdapterGenericCompletedBus.cs @@ -26,7 +26,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.CompletedBus.Gener { GearboxType.MT, GearboxType.AMT, GearboxType.ATPowerSplit, GearboxType.ATSerial }; #region ComponentDataAdapter - private readonly IDriverDataAdapter _driverDataAdapter = new CompletedBusGenericDriverDataAdapter(); + private readonly IDriverDataAdapterBus _driverDataAdapter = new CompletedBusGenericDriverDataAdapter(); //protected readonly IVehicleDataAdapter _vehicleDataAdapter = new CompletedBusGenericVehicleDataAdapter(); private readonly IAxleGearDataAdapter _axleGearDataAdapter = new GenericCompletedBusAxleGearDataAdapter(); private readonly IRetarderDataAdapter _retarderDataAdapter = new GenericRetarderDataAdapter(); @@ -61,6 +61,12 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.CompletedBus.Gener return _airdragDataAdapter.CreateAirdragData(airdragData, mission, segment); } + public DriverData CreateBusDriverData(Segment segment, VectoSimulationJobType jobType, ArchitectureID arch, + CompressorDrive compressorDrive) + { + return _driverDataAdapter.CreateBusDriverData(segment, jobType, arch, compressorDrive); + } + public CombustionEngineData CreateEngineData(IVehicleDeclarationInputData primaryVehicle, int modeIdx, Mission mission) { return EngineDataAdapter.CreateEngineData(primaryVehicle, modeIdx, mission); @@ -170,10 +176,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.CompletedBus.Gener } - public DriverData CreateDriverData(Segment segment) - { - return _driverDataAdapter.CreateDriverData(segment); - } + public IAuxiliaryConfig CreateBusAuxiliariesData(Mission mission, IVehicleDeclarationInputData primaryVehicle, IVehicleDeclarationInputData completedVehicle, VectoRunData runData) diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs index 2e72270f8d281e93b15e7feb838cb165d5d182ce..8054a073d67aa7a989aabce578e9a4909fa1a195 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs @@ -514,10 +514,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter OverSpeed = overspeedData, EngineStopStart = new DriverData.EngineStopStartData() { EngineOffStandStillActivationDelay = - driver.EngineStopStartData?.ActivationDelay ?? DeclarationData.Driver.EngineStopStart.ActivationDelay, - MaxEngineOffTimespan = driver.EngineStopStartData?.MaxEngineOffTimespan ?? DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan, - UtilityFactorStandstill = driver.EngineStopStartData?.UtilityFactorStandstill ?? DeclarationData.Driver.EngineStopStart.UtilityFactor, - UtilityFactorDriving = driver.EngineStopStartData?.UtilityFactorDriving ?? DeclarationData.Driver.EngineStopStart.UtilityFactor, + driver.EngineStopStartData?.ActivationDelay ?? DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, + MaxEngineOffTimespan = driver.EngineStopStartData?.MaxEngineOffTimespan ?? DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan, + UtilityFactorStandstill = driver.EngineStopStartData?.UtilityFactorStandstill ?? DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor, + UtilityFactorDriving = driver.EngineStopStartData?.UtilityFactorDriving ?? DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor, }, EcoRoll = new DriverData.EcoRollData() { UnderspeedThreshold = driver.EcoRollData?.UnderspeedThreshold ?? DeclarationData.Driver.EcoRoll.UnderspeedThreshold, diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/IDeclarationDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/IDeclarationDataAdapter.cs index 1df4eb7214e7c1621e1eb5a597011435be82adb7..708d2bea47cdcd628ee100b8ed066be136a4c7d0 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/IDeclarationDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/IDeclarationDataAdapter.cs @@ -4,6 +4,7 @@ using TUGraz.VectoCommon.BusAuxiliaries; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.SimulationComponent; @@ -15,7 +16,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter { public interface IDeclarationDataAdapter { - DriverData CreateDriverData(Segment segment); + VehicleData CreateVehicleData(IVehicleDeclarationInputData vehicle, Segment segment, Mission first, KeyValuePair<LoadingType, Tuple<Kilogram, double?>> keyValuePair, bool allowVocational); @@ -43,8 +44,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter public interface ILorryDeclarationDataAdapter : IDeclarationDataAdapter { + DriverData CreateDriverData(Segment segment); - AxleGearData CreateDummyAxleGearData(IGearboxDeclarationInputData gbxData); + AxleGearData CreateDummyAxleGearData(IGearboxDeclarationInputData gbxData); PTOData CreatePTOTransmissionData(IPTOTransmissionInputData ptoData, IGearboxDeclarationInputData gbx); PTOData CreatePTOCycleData(IGearboxDeclarationInputData gbx, IPTOTransmissionInputData pto); @@ -79,7 +81,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter IAuxiliaryConfig CreateBusAuxiliariesData( Mission mission, IVehicleDeclarationInputData vehicleData, VectoRunData runData); - AxleGearData CreateDummyAxleGearData(IGearboxDeclarationInputData gbxData); + DriverData CreateBusDriverData(Segment segment, VectoSimulationJobType jobType, ArchitectureID arch, CompressorDrive compressorDrive); + + + AxleGearData CreateDummyAxleGearData(IGearboxDeclarationInputData gbxData); CombustionEngineData CreateEngineData(IVehicleDeclarationInputData vehicle, IEngineModeDeclarationInputData engineMode, Mission mission); @@ -104,8 +109,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter public interface IGenericCompletedBusDeclarationDataAdapter : IDeclarationDataAdapter { AirdragData CreateAirdragData(IAirdragDeclarationInputData airdragData, Mission mission, Segment segment); - - CombustionEngineData CreateEngineData(IVehicleDeclarationInputData primaryVehicle, int modeIdx, + DriverData CreateBusDriverData(Segment segment, VectoSimulationJobType jobType, ArchitectureID arch, CompressorDrive compressorDrive); + CombustionEngineData CreateEngineData(IVehicleDeclarationInputData primaryVehicle, int modeIdx, Mission mission); IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxData, @@ -131,7 +136,6 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter { IAuxiliaryConfig CreateBusAuxiliariesData(Mission mission, IVehicleDeclarationInputData primaryVehicle, IVehicleDeclarationInputData completedVehicle, VectoRunData runData); - VehicleData CreateVehicleData(IVehicleDeclarationInputData primaryVehicle, IVehicleDeclarationInputData completedVehicle, Segment segment, Mission mission, KeyValuePair<LoadingType, Tuple<Kilogram, double?>> loading); @@ -149,9 +153,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter AirdragData CreateAirdragData(IVehicleDeclarationInputData completedVehicle, Mission mission); CombustionEngineData CreateEngineData(IVehicleDeclarationInputData vehicle, IEngineModeDeclarationInputData engineMode, Mission mission); - - - IEnumerable<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxInputData, + DriverData CreateBusDriverData(Segment segment, VectoSimulationJobType jobType, ArchitectureID arch, CompressorDrive compressorDrive); + + IEnumerable<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxInputData, IBusAuxiliariesDeclarationData busAuxInput, MissionType mission, VehicleClass segment, Meter vehicleLength, int? numSteeredAxles, VectoSimulationJobType jobType); IAuxiliaryConfig CreateBusAuxiliariesData(Mission mission, IVehicleDeclarationInputData primaryVehicle, IVehicleDeclarationInputData completedVehicle, VectoRunData simulationRunData); diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/PrimaryBus/DeclarationDataAdapterPrimaryBus.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/PrimaryBus/DeclarationDataAdapterPrimaryBus.cs index f4ab788f21fadc7adcbeaca5a40d54de74ac346c..c5009da17ccad4ea863366b2766caf121f67a069 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/PrimaryBus/DeclarationDataAdapterPrimaryBus.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/PrimaryBus/DeclarationDataAdapterPrimaryBus.cs @@ -25,7 +25,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus public abstract GearboxType[] SupportedGearboxTypes { get; } - private readonly IDriverDataAdapter _driverDataAdapter = new PrimaryBusDriverDataAdapter(); + private readonly IDriverDataAdapterBus _driverDataAdapter = new PrimaryBusDriverDataAdapter(); //protected readonly IVehicleDataAdapter _vehicleDataAdapter = new PrimaryBusVehicleDataAdapter(); protected readonly IAxleGearDataAdapter _axleGearDataAdapter = new AxleGearDataAdapter(); //protected readonly IPrimaryBusAuxiliaryDataAdapter _auxDataAdapter = new PrimaryBusAuxiliaryDataAdapter(); @@ -44,12 +44,15 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus protected abstract IPrimaryBusAuxiliaryDataAdapter AuxDataAdapter { get; } - public virtual DriverData CreateDriverData(Segment segment) + + public DriverData CreateBusDriverData(Segment segment, VectoSimulationJobType jobType, ArchitectureID arch, + CompressorDrive compressorDrive) { - return _driverDataAdapter.CreateDriverData(segment); + return _driverDataAdapter.CreateBusDriverData(segment, jobType, arch, compressorDrive); } - public virtual VehicleData CreateVehicleData(IVehicleDeclarationInputData vehicle, Segment segment, Mission mission, + + public virtual VehicleData CreateVehicleData(IVehicleDeclarationInputData vehicle, Segment segment, Mission mission, KeyValuePair<LoadingType, Tuple<Kilogram, double?>> loading, bool allowVocational) { return VehicleDataAdapter.CreateVehicleData(vehicle, segment, mission, loading.Value.Item1, @@ -150,6 +153,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus } + public AxleGearData CreateDummyAxleGearData(IGearboxDeclarationInputData gbxData) { throw new NotImplementedException(); diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/DriverDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/DriverDataAdapter.cs index e81dfc39ebdc85420c3327e2a94c7477753de1c8..9dbb401e8f2d194a22efb6cb4a9dbf3cf0202f69 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/DriverDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/DriverDataAdapter.cs @@ -1,19 +1,41 @@ -using TUGraz.VectoCore.InputData.Reader.ComponentData; +using System; +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.Declaration; using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.OutputData; namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents { - internal abstract class DriverDataAdapter : IDriverDataAdapter + internal abstract class DriverDataAdapter : IDriverDataAdapter, IDriverDataAdapterBus { protected DriverDataAdapter() { } #region Implementation of IDriverDataAdapter - + public DriverData CreateDriverData(Segment segment) + { + var data = DoCreateDriverData(segment); + data.EngineStopStart = GetEngineStopStartData(null, null, null); + return data; + } + + #endregion + + #region Implementation of IDriverDataAdapterBus + + public DriverData CreateBusDriverData(Segment segment, VectoSimulationJobType jobType, ArchitectureID arch, CompressorDrive compressorDrive) + { + var data = DoCreateDriverData(segment); + data.EngineStopStart = GetEngineStopStartData(jobType, arch, compressorDrive); + return data; + } - public virtual DriverData CreateDriverData(Segment segment) + #endregion + + protected virtual DriverData DoCreateDriverData(Segment segment) { var lookAheadData = new DriverData.LACData { @@ -35,13 +57,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen { LookAheadCoasting = lookAheadData, OverSpeed = overspeedData, - EngineStopStart = new DriverData.EngineStopStartData() - { - EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineStopStart.ActivationDelay, - MaxEngineOffTimespan = DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan, - UtilityFactorStandstill = DeclarationData.Driver.EngineStopStart.UtilityFactor, - UtilityFactorDriving = DeclarationData.Driver.EngineStopStart.UtilityFactor, - }, + EcoRoll = new DriverData.EcoRollData() { UnderspeedThreshold = DeclarationData.Driver.EcoRoll.UnderspeedThreshold, @@ -64,30 +80,78 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen retVal.AccelerationCurve = AccelerationCurveReader.ReadFromStream(segment.AccelerationFile); return retVal; } - #endregion - } + protected abstract DriverData.EngineStopStartData GetEngineStopStartData(VectoSimulationJobType? jobType, + ArchitectureID? arch, CompressorDrive? compressorDrive); + + + + } internal sealed class LorryDriverDataAdapter : DriverDataAdapter { #region Overrides of DriverDataAdapter - public override DriverData CreateDriverData(Segment segment) + protected override DriverData DoCreateDriverData(Segment segment) { return base.CreateDriverData(segment:segment); } + protected override DriverData.EngineStopStartData GetEngineStopStartData(VectoSimulationJobType? jobType, + ArchitectureID? arch, CompressorDrive? compressorDrive) + { + var engineStopStartLorry = DeclarationData.Driver.GetEngineStopStartLorry(); + + + return new DriverData.EngineStopStartData() + { + EngineOffStandStillActivationDelay = engineStopStartLorry.ActivationDelay, + MaxEngineOffTimespan = engineStopStartLorry.MaxEngineOffTimespan, + UtilityFactorStandstill = engineStopStartLorry.UtilityFactor, + UtilityFactorDriving = engineStopStartLorry.UtilityFactor, + }; + } + + #endregion + } + + internal abstract class BusDriverDataAdapter : DriverDataAdapter + { + #region Overrides of DriverDataAdapter + + protected override DriverData.EngineStopStartData GetEngineStopStartData(VectoSimulationJobType? jobType, + ArchitectureID? arch, CompressorDrive? compressorDrive) + { + DeclarationData.Driver.IEngineStopStart busEngineStartStop; + try { + busEngineStartStop = + DeclarationData.Driver.GetEngineStopStartBus(jobType.Value, arch.Value, compressorDrive.Value); + } catch (InvalidOperationException ioe) { + throw new VectoException("JobType, Architecture and Compressor Drive must be provided for Buses", ioe); + } + + + return new DriverData.EngineStopStartData() { + EngineOffStandStillActivationDelay = busEngineStartStop.ActivationDelay, + MaxEngineOffTimespan = busEngineStartStop.MaxEngineOffTimespan, + UtilityFactorStandstill = busEngineStartStop.UtilityFactor, + UtilityFactorDriving = busEngineStartStop.UtilityFactor, + }; + } + #endregion } - internal sealed class PrimaryBusDriverDataAdapter : DriverDataAdapter + + + internal sealed class PrimaryBusDriverDataAdapter : BusDriverDataAdapter { #region Overrides of DriverDataAdapter - public override DriverData CreateDriverData(Segment segment) + protected override DriverData DoCreateDriverData(Segment segment) { - var retVal = base.CreateDriverData(segment); + var retVal = base.DoCreateDriverData(segment); retVal.LookAheadCoasting.Enabled = true; return retVal; } @@ -95,22 +159,22 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen #endregion } - internal sealed class CompletedBusGenericDriverDataAdapter : DriverDataAdapter + internal sealed class CompletedBusGenericDriverDataAdapter : BusDriverDataAdapter { - public override DriverData CreateDriverData(Segment segment) + protected override DriverData DoCreateDriverData(Segment segment) { - var retVal = base.CreateDriverData(segment); + var retVal = base.DoCreateDriverData(segment); retVal.LookAheadCoasting.Enabled = false; retVal.OverSpeed.Enabled = false; return retVal; } } - internal sealed class CompletedBusSpecificDriverDataAdapter : DriverDataAdapter + internal sealed class CompletedBusSpecificDriverDataAdapter : BusDriverDataAdapter { - public override DriverData CreateDriverData(Segment segment) + protected override DriverData DoCreateDriverData(Segment segment) { - var retVal = base.CreateDriverData(segment); + var retVal = base.DoCreateDriverData(segment); retVal.LookAheadCoasting.Enabled = false; retVal.OverSpeed.Enabled = false; return retVal; diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/Interfaces/IDriverDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/Interfaces/IDriverDataAdapter.cs index 0d10a46d33748fe19742f7fa0d33abb2ead9693c..e8a0b90f7a53650cf69714fe5e70bcaaf80c803b 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/Interfaces/IDriverDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/Interfaces/IDriverDataAdapter.cs @@ -1,4 +1,5 @@ -using TUGraz.VectoCore.Models.Declaration; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.SimulationComponent.Data; namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponents.Interfaces @@ -6,5 +7,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen public interface IDriverDataAdapter { DriverData CreateDriverData(Segment segment); - } + } + + public interface IDriverDataAdapterBus + { + DriverData CreateBusDriverData(Segment segment, VectoSimulationJobType jobType, ArchitectureID arch, CompressorDrive compressorDrive); + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SingleBus/DeclarationDataAdapterSingleBus.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SingleBus/DeclarationDataAdapterSingleBus.cs index ce24d52527e96d583c783463352d462fe1208ad5..80e86ff70b9ba9e2ab56ea526d5ed2accb429cb9 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SingleBus/DeclarationDataAdapterSingleBus.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SingleBus/DeclarationDataAdapterSingleBus.cs @@ -27,7 +27,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SingleBus { public abstract GearboxType[] SupportedGearboxTypes { get; } - private IDriverDataAdapter _driverDataAdapter = new PrimaryBusDriverDataAdapter(); + private IDriverDataAdapterBus _driverDataAdapter = new PrimaryBusDriverDataAdapter(); private SingleBusVehicleDataAdapter _vehicleDataAdapter = new SingleBusVehicleDataAdapter(); private IAxleGearDataAdapter _axleGearDataAdapter = new AxleGearDataAdapter(); private IRetarderDataAdapter _retarderDataAdapter = new RetarderDataAdapter(); @@ -89,11 +89,13 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SingleBus return EngineDataAdapter.CreateEngineData(vehicle, engineMode, mission); } - public virtual DriverData CreateDriverData(Segment segment) + public DriverData CreateBusDriverData(Segment segment, VectoSimulationJobType jobType, ArchitectureID arch, + CompressorDrive compressorDrive) { - return _driverDataAdapter.CreateDriverData(segment); + return _driverDataAdapter.CreateBusDriverData(segment, jobType, arch, compressorDrive); } + //public virtual AxleGearData CreateDummyAxleGearData(IGearboxDeclarationInputData gearboxInputData) //{ // return _axleGearDataAdapter.CreateDummyAxleGearData(gearboxInputData); diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/AbstractDeclarationVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/AbstractDeclarationVectoRunDataFactory.cs index 35d56868f34196c5e786a8695f8cbeaeb82a297f..e85533945e99112b8e7b4c46cd6e9d0a2d303f2c 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/AbstractDeclarationVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/AbstractDeclarationVectoRunDataFactory.cs @@ -57,7 +57,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl { protected IMissionFilter MissionFilter { get; } - protected DriverData DriverData => _driverdata ?? (_driverdata = CreateDriverData(_segment)); + protected DriverData DriverData => _driverdata ??(_driverdata= CreateDriverData(_segment)); protected abstract DriverData CreateDriverData(Segment segment); public virtual IEnumerable<VectoRunData> NextRun() diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/CompletedBusRunDataFactory/DeclarationModeCompletedBusRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/CompletedBusRunDataFactory/DeclarationModeCompletedBusRunDataFactory.cs index 84e08ab0390c391e295592e13cbe66576314e29f..03c99e6191a9c92564881053b72add8f5b2fcb8c 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/CompletedBusRunDataFactory/DeclarationModeCompletedBusRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/CompletedBusRunDataFactory/DeclarationModeCompletedBusRunDataFactory.cs @@ -60,7 +60,11 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.CompletedBusRun protected override DriverData CreateDriverData(Segment segment) { - return DataAdapterGeneric.CreateDriverData(segment); + CompressorDrive compressorDrive = + PrimaryVehicle.Components.BusAuxiliaries.PneumaticSupply.CompressorDrive; + ArchitectureID arch = PrimaryVehicle.ArchitectureID; + VectoSimulationJobType jobType = PrimaryVehicle.VehicleType; + return DataAdapterGeneric.CreateBusDriverData(segment, jobType, arch, compressorDrive); } protected override VectoRunData GetPowertrainConfigForReportInit() diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/HeavyLorryRunDataFactory/DeclarationModeHeavyLorryRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/HeavyLorryRunDataFactory/DeclarationModeHeavyLorryRunDataFactory.cs index 3bc4614b74a11741276ed9a9da445b56a5a1262e..91db54397b4ec100a0bf0a4c19149e9f14c43e8d 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/HeavyLorryRunDataFactory/DeclarationModeHeavyLorryRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/HeavyLorryRunDataFactory/DeclarationModeHeavyLorryRunDataFactory.cs @@ -37,6 +37,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.HeavyLorryRunDa #region Overrides of AbstractDeclarationVectoRunDataFactory + protected override DriverData CreateDriverData(Segment segment) { return DataAdapter.CreateDriverData(segment); diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/PrimaryBusRunDataFactory/DeclarationModePrimaryBusRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/PrimaryBusRunDataFactory/DeclarationModePrimaryBusRunDataFactory.cs index 9990fff4439c4f90f06eb1d17761d33886d6fcff..ba12b9726657336334088ff10346f671ba0fa524 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/PrimaryBusRunDataFactory/DeclarationModePrimaryBusRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/PrimaryBusRunDataFactory/DeclarationModePrimaryBusRunDataFactory.cs @@ -42,7 +42,10 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.PrimaryBusRunDa protected override DriverData CreateDriverData(Segment segment) { - return DataAdapter.CreateDriverData(segment); + VectoSimulationJobType jobType = DataProvider.JobInputData.JobType; + ArchitectureID arch = DataProvider.JobInputData.Vehicle.ArchitectureID; + CompressorDrive compressorDrive = DataProvider.JobInputData.Vehicle.Components.BusAuxiliaries.PneumaticSupply.CompressorDrive; + return DataAdapter.CreateBusDriverData(segment, jobType, arch, compressorDrive); } #endregion diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/SingleBus/DeclarationModeSingleBusVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/SingleBus/DeclarationModeSingleBusVectoRunDataFactory.cs index c5761106978adbc23d6c2a9f5d627d01f2832586..e46849cd2e03784848f152bb2f0a2633d091ec65 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/SingleBus/DeclarationModeSingleBusVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/SingleBus/DeclarationModeSingleBusVectoRunDataFactory.cs @@ -111,7 +111,11 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.SingleBus protected override DriverData CreateDriverData(Segment segment) { - return DataAdapter.CreateDriverData(segment); + + return DataAdapter.CreateBusDriverData(segment, + jobType: PrimaryVehicle.VehicleType, + arch: PrimaryVehicle.ArchitectureID, + compressorDrive: PrimaryVehicle.Components.BusAuxiliaries.PneumaticSupply.CompressorDrive); } protected override VectoRunData GetPowertrainConfigForReportInit() diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactoryHeavyBusPrimary.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactoryHeavyBusPrimary.cs index 6cf4b896f7d2d534550bd89b117d98822007ec9f..b11be8aa6f048ef8be115c682052402ea9c1e267 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactoryHeavyBusPrimary.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactoryHeavyBusPrimary.cs @@ -46,7 +46,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl Segment = DeclarationData.PrimaryBusSegments.Lookup( vehicle.VehicleCategory, vehicle.AxleConfiguration, vehicle.Articulated); - Driverdata = DataAdapter.CreateDriverData(Segment); + Driverdata = DataAdapter.CreateBusDriverData(Segment, vehicle.VehicleType, vehicle.ArchitectureID, vehicle.Components.BusAuxiliaries.PneumaticSupply.CompressorDrive); Driverdata.AccelerationCurve = AccelerationCurveReader.ReadFromStream(Segment.AccelerationFile); var tempVehicle = DataAdapter.CreateVehicleData( vehicle, Segment, Segment.Missions.First(), diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs index 5d7855f1dd244b53cac063f212ee690763a783a3..f8ca6b843aa2c4bcc593fc0416eb3b5344e45f3b 100644 --- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs +++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs @@ -31,6 +31,7 @@ using System; using System.Collections.Generic; +using System.Drawing; using System.IO; using System.Linq; using TUGraz.VectoCommon.BusAuxiliaries; @@ -59,6 +60,7 @@ using TUGraz.VectoCore.Models.SimulationComponent.Data.ElectricComponents.Batter using TUGraz.VectoCore.Models.SimulationComponent.Impl; using TUGraz.VectoCore.OutputData; using TUGraz.VectoCore.OutputData.XML; +using Point = TUGraz.VectoCommon.Utils.Point; namespace TUGraz.VectoCore.Models.Declaration { @@ -609,11 +611,83 @@ namespace TUGraz.VectoCore.Models.Declaration public static readonly MeterPerSecond AllowedOverSpeed = 2.5.KMPHtoMeterPerSecond(); } - public static class EngineStopStart + public interface IEngineStopStart { + Second ActivationDelay { get; } + Second MaxEngineOffTimespan { get; } + double UtilityFactor { get; } + } + private class EngineStopStartLorry : IEngineStopStart { - public static readonly Second ActivationDelay = 2.SI<Second>(); - public static readonly Second MaxEngineOffTimespan = 120.SI<Second>(); - public const double UtilityFactor = 0.8; + public Second ActivationDelay => 2.SI<Second>(); + public Second MaxEngineOffTimespan => 120.SI<Second>(); + public double UtilityFactor => 0.8; + } + + private class EngineStopStartBus : IEngineStopStart + { + private const double ConventionalUF = 0.35; + private const double HybridElectrifiedCompressorUF = 0.65; + private const double HybridUF = 0.55; + + public EngineStopStartBus(VectoSimulationJobType simType, CompressorDrive compressorDrive, ArchitectureID arch) + { + if (simType == VectoSimulationJobType.ConventionalVehicle) { + arch = ArchitectureID.UNKNOWN; + } + + _jobType = simType; + _compressorDrive = compressorDrive; + _arch = arch; + + if (_jobType == VectoSimulationJobType.ConventionalVehicle) + { + // P0 ??? + UtilityFactor = ConventionalUF; + } + + + if (_compressorDrive == CompressorDrive.electrically) { + UtilityFactor = HybridElectrifiedCompressorUF; + } + + UtilityFactor = HybridUF; + } + private CompressorDrive _compressorDrive; + private ArchitectureID _arch; + private readonly VectoSimulationJobType _jobType; + public Second ActivationDelay => 2.SI<Second>(); + public Second MaxEngineOffTimespan => 12.SI<Second>(); + public double UtilityFactor { get; } + } + + + public static IEngineStopStart GetEngineStopStartLorry() + { + return new EngineStopStartLorry(); + } + + /// <summary> + /// + /// </summary> + /// <param name="hdvClass"></param> + /// <param name="jobType">only used for buses</param> + /// <param name="arch">only used for buses</param> + /// <param name="compressorDrive">only used for buses</param> + /// <returns></returns> + public static IEngineStopStart GetEngineStopStart(VehicleClass hdvClass, VectoSimulationJobType? jobType = null, ArchitectureID? arch = null, + CompressorDrive? compressorDrive = null) + { + + if (hdvClass.IsBus()) { + return GetEngineStopStartBus(jobType.Value, arch.Value, compressorDrive.Value); + } else { + return new EngineStopStartLorry(); + } + } + + public static IEngineStopStart GetEngineStopStartBus(VectoSimulationJobType jobType, ArchitectureID arch, CompressorDrive compressorDrive) + { + return new EngineStopStartBus(jobType, compressorDrive, arch); } public static class EcoRoll diff --git a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs index 46abcbf3bb4c8b44a74450b49fe100728b616b2f..cbd333fc6d57ae6b96f95f00f6713589b593dc03 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs @@ -199,12 +199,12 @@ namespace TUGraz.VectoCore.OutputData.XML { var fuelFactor = CalculateFactor(combinedResults, r => r.FuelConsumptionFinal(fuel).TotalFuelConsumptionCorrected); - var completedFuelConsumption = + var energyDemand = fuelFactor * (primary.EnergyConsumption[fuel] * specific.Distance); var fuelConsumption = new CompletedBusFuelConsumption() { Fuel = specific.FuelData.Single(f => f.FuelType == fuel), - EnergyDemand = completedFuelConsumption, + EnergyDemand = energyDemand, }; co2Sum += fuelConsumption.TotalFuelConsumptionCorrected * fuelConsumption.Fuel.CO2PerFuelWeight; result.CorrectedFinalFuelConsumption.Add(fuel, fuelConsumption); diff --git a/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs b/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs index eebaa3d648053d4467728c11f9ce3afbab611aa8..47521814310795fdb9723c10ea68465e15d6c7f7 100644 --- a/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs +++ b/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs @@ -251,9 +251,9 @@ namespace TUGraz.VectoCore.Tests.Integration LookAheadDecisionFactor = new LACDecisionFactor() }, EngineStopStart = new DriverData.EngineStopStartData() { - EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineStopStart.ActivationDelay, - MaxEngineOffTimespan = DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan, - UtilityFactorStandstill = DeclarationData.Driver.EngineStopStart.UtilityFactor, + EngineOffStandStillActivationDelay = DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, + MaxEngineOffTimespan = DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan, + UtilityFactorStandstill = DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor, }, OverSpeed = new DriverData.OverSpeedData { Enabled = overspeed, diff --git a/VectoCore/VectoCoreTest/Integration/BatteryElectric/BatteryElectricTest.cs b/VectoCore/VectoCoreTest/Integration/BatteryElectric/BatteryElectricTest.cs index 0a32bcf29f8e201440411ea3fc8710178e5f4f86..47e5230f203b503feb838102ca286d5d4adc3a79 100644 --- a/VectoCore/VectoCoreTest/Integration/BatteryElectric/BatteryElectricTest.cs +++ b/VectoCore/VectoCoreTest/Integration/BatteryElectric/BatteryElectricTest.cs @@ -1114,9 +1114,9 @@ namespace TUGraz.VectoCore.Tests.Integration.BatteryElectric OverSpeed = 5.KMPHtoMeterPerSecond() }, EngineStopStart = new DriverData.EngineStopStartData() { - EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineStopStart.ActivationDelay, - MaxEngineOffTimespan = DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan, - UtilityFactorStandstill = DeclarationData.Driver.EngineStopStart.UtilityFactor + EngineOffStandStillActivationDelay = DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, + MaxEngineOffTimespan = DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan, + UtilityFactorStandstill = DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor }, }; } diff --git a/VectoCore/VectoCoreTest/Integration/CoachPowerTrain.cs b/VectoCore/VectoCoreTest/Integration/CoachPowerTrain.cs index de977099d7031bb320adb9a7422d754631458cd6..eb06dc8a4f3474194775dc7c94f604b584bb0a28 100644 --- a/VectoCore/VectoCoreTest/Integration/CoachPowerTrain.cs +++ b/VectoCore/VectoCoreTest/Integration/CoachPowerTrain.cs @@ -239,9 +239,9 @@ namespace TUGraz.VectoCore.Tests.Integration LookAheadDecisionFactor = new LACDecisionFactor() }, EngineStopStart = new DriverData.EngineStopStartData() { - EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineStopStart.ActivationDelay, - MaxEngineOffTimespan = DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan, - UtilityFactorStandstill = DeclarationData.Driver.EngineStopStart.UtilityFactor, + EngineOffStandStillActivationDelay = DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, + MaxEngineOffTimespan = DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan, + UtilityFactorStandstill = DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor, }, OverSpeed = new DriverData.OverSpeedData { Enabled = overspeed, diff --git a/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusFactorMethodTest.cs b/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusFactorMethodTest.cs index 2dc9a4fcc846d8951754d07266d4c315a2e41dac..d444531b1ea49faeaf79e5f3d7864073b7e62789 100644 --- a/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusFactorMethodTest.cs +++ b/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusFactorMethodTest.cs @@ -900,9 +900,9 @@ namespace TUGraz.VectoCore.Tests.Integration.CompletedBus private void AssertStopStartData(DriverData.EngineStopStartData engineStopStart) { - Assert.AreEqual(DeclarationData.Driver.EngineStopStart.ActivationDelay, engineStopStart.EngineOffStandStillActivationDelay); - Assert.AreEqual(DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan, engineStopStart.MaxEngineOffTimespan); - Assert.AreEqual(DeclarationData.Driver.EngineStopStart.UtilityFactor, engineStopStart.UtilityFactorStandstill); + Assert.AreEqual(DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, engineStopStart.EngineOffStandStillActivationDelay); + Assert.AreEqual(DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan, engineStopStart.MaxEngineOffTimespan); + Assert.AreEqual(DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor, engineStopStart.UtilityFactorStandstill); } private void AssertEcoRoll(DriverData.EcoRollData ecoRoll) diff --git a/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs b/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs index 763559b0763ac8c8c1fca5264d4659272d10d649..4ac5ddd0230fc96c26f3cba8dc92c4cee4b3dc67 100644 --- a/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs +++ b/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs @@ -2099,9 +2099,9 @@ namespace TUGraz.VectoCore.Tests.Integration.Hybrid OverSpeed = 5.KMPHtoMeterPerSecond() }, EngineStopStart = new DriverData.EngineStopStartData() { - EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineStopStart.ActivationDelay, - MaxEngineOffTimespan = DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan, - UtilityFactorStandstill = DeclarationData.Driver.EngineStopStart.UtilityFactor + EngineOffStandStillActivationDelay = DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, + MaxEngineOffTimespan = DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan, + UtilityFactorStandstill = DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor } }; } diff --git a/VectoCore/VectoCoreTest/Integration/Hybrid/SerialHybridTest.cs b/VectoCore/VectoCoreTest/Integration/Hybrid/SerialHybridTest.cs index e90659ada870eca46c84896b43006ee1eb2c3aec..7ef22a351e837237dc1f65225026a95e45e2a0bf 100644 --- a/VectoCore/VectoCoreTest/Integration/Hybrid/SerialHybridTest.cs +++ b/VectoCore/VectoCoreTest/Integration/Hybrid/SerialHybridTest.cs @@ -980,9 +980,9 @@ namespace TUGraz.VectoCore.Tests.Integration.Hybrid OverSpeed = 5.KMPHtoMeterPerSecond() }, EngineStopStart = new DriverData.EngineStopStartData() { - EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineStopStart.ActivationDelay, - MaxEngineOffTimespan = DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan, - UtilityFactorStandstill = DeclarationData.Driver.EngineStopStart.UtilityFactor + EngineOffStandStillActivationDelay = DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, + MaxEngineOffTimespan = DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan, + UtilityFactorStandstill = DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor } }; } diff --git a/VectoCore/VectoCoreTest/Integration/Truck40tPowerTrain.cs b/VectoCore/VectoCoreTest/Integration/Truck40tPowerTrain.cs index 1f988ec23bbb248e3bdfa8f79e6050857302fbc0..f864d4d8470681671d7c09179d74d077fb957ade 100644 --- a/VectoCore/VectoCoreTest/Integration/Truck40tPowerTrain.cs +++ b/VectoCore/VectoCoreTest/Integration/Truck40tPowerTrain.cs @@ -269,9 +269,9 @@ namespace TUGraz.VectoCore.Tests.Integration LookAheadDecisionFactor = new LACDecisionFactor() }, EngineStopStart = new DriverData.EngineStopStartData() { - EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineStopStart.ActivationDelay, - MaxEngineOffTimespan = DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan, - UtilityFactorStandstill = DeclarationData.Driver.EngineStopStart.UtilityFactor, + EngineOffStandStillActivationDelay = DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, + MaxEngineOffTimespan = DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan, + UtilityFactorStandstill = DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor, }, OverSpeed = new DriverData.OverSpeedData() { Enabled = overspeed, diff --git a/VectoCore/VectoCoreTest/Models/Simulation/MeasuredSpeedModeTest.cs b/VectoCore/VectoCoreTest/Models/Simulation/MeasuredSpeedModeTest.cs index 2347bc503caef67d8a8ae02ee3b425dd1095b561..dc7de2ef64012b90d57a49f603a80318c1ed0e36 100644 --- a/VectoCore/VectoCoreTest/Models/Simulation/MeasuredSpeedModeTest.cs +++ b/VectoCore/VectoCoreTest/Models/Simulation/MeasuredSpeedModeTest.cs @@ -268,9 +268,9 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation Retarder = new RetarderData(), DriverData = new DriverData() { EngineStopStart = new DriverData.EngineStopStartData() { - UtilityFactorStandstill = DeclarationData.Driver.EngineStopStart.UtilityFactor, - EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineStopStart.ActivationDelay, - MaxEngineOffTimespan = DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan + UtilityFactorStandstill = DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor, + EngineOffStandStillActivationDelay = DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, + MaxEngineOffTimespan = DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan } }, ElectricMachinesData = new List<Tuple<PowertrainPosition, ElectricMotorData>>() @@ -353,9 +353,9 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation Retarder = new RetarderData(), DriverData = new DriverData() { EngineStopStart = new DriverData.EngineStopStartData() { - EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineStopStart.ActivationDelay, - UtilityFactorStandstill = DeclarationData.Driver.EngineStopStart.UtilityFactor, - MaxEngineOffTimespan = DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan, + EngineOffStandStillActivationDelay = DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, + UtilityFactorStandstill = DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor, + MaxEngineOffTimespan = DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan, } }, ElectricMachinesData = new List<Tuple<PowertrainPosition, ElectricMotorData>>() diff --git a/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs b/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs index 8c6ee7bf168954af9c5cb27351b74f6a9cb5c73f..18a96c066a41e15ba5fc8679c655a9cef41fe639 100644 --- a/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs +++ b/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs @@ -179,9 +179,9 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation Retarder = new RetarderData(), DriverData = new DriverData() { EngineStopStart = new DriverData.EngineStopStartData() { - UtilityFactorStandstill = DeclarationData.Driver.EngineStopStart.UtilityFactor, - EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineStopStart.ActivationDelay, - MaxEngineOffTimespan = DeclarationData.Driver.EngineStopStart.MaxEngineOffTimespan + UtilityFactorStandstill = DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor, + EngineOffStandStillActivationDelay = DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, + MaxEngineOffTimespan = DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan } } };