diff --git a/VECTO/Input Files/VectoJob.vb b/VECTO/Input Files/VectoJob.vb index 6dddb6dec23869ec679e7eaef75719fd8e1a1346..876c3f5955ee683b00fd8c5af42fda3f81484264 100644 --- a/VECTO/Input Files/VectoJob.vb +++ b/VECTO/Input Files/VectoJob.vb @@ -73,6 +73,7 @@ Public Class VectoJob Public EcoRollOn As Boolean Public LookAheadMinSpeed As Double + Private _shiftStrategy As String Public Property StartStopMaxSpeed As Double @@ -545,6 +546,15 @@ Public Class VectoJob End Get End Property + Public Property ShiftStrategy As String Implements IDeclarationJobInputData.ShiftStrategy + Get + Return _shiftStrategy + End Get + set (value as string) + _shiftStrategy = value + End set + End Property + Public Property AuxPAdd As Double Public ReadOnly Property IAuxiliariesDeclarationInputData_SavedInDeclarationMode As Boolean _ diff --git a/VECTO/OutputData/JSONFileWriter.vb b/VECTO/OutputData/JSONFileWriter.vb index 04ce6fc20aaf88751d8a33aea39565e7857fcc72..8c7acd6232c9a3cad01a829ca36fa26a21326042 100644 --- a/VECTO/OutputData/JSONFileWriter.vb +++ b/VECTO/OutputData/JSONFileWriter.vb @@ -269,10 +269,11 @@ Public Class JSONFileWriter body.Add("VehicleFile", GetRelativePath(job.Vehicle.Source, basePath)) body.Add("EngineFile", GetRelativePath(input.JobInputData.Vehicle.EngineInputData.Source, basePath)) body.Add("GearboxFile", GetRelativePath(input.JobInputData.Vehicle.GearboxInputData.Source, basePath)) - if not job.SavedInDeclarationMode then + if not job.SavedInDeclarationMode AndAlso Not(input.GearshiftInputData is Nothing) then body.Add("TCU", GetRelativePath(input.GearshiftInputData.Source, basePath)) end if - + body.Add("ShiftStrategy", input.JobInputData.ShiftStrategy) + Dim aux As IAuxiliariesEngineeringInputData = job.Vehicle.AuxiliaryInputData() 'AA-TB 'ADVANCED AUXILIARIES diff --git a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs index 3a77f6525ca9e9835699e2013e56194860c22717..08d90d854b7f2f13bf370abd64e3061a6824457b 100644 --- a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs +++ b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs @@ -44,6 +44,9 @@ namespace TUGraz.VectoCommon.InputData IVehicleDeclarationInputData Vehicle { get; } string JobName { get; } + + string ShiftStrategy { get; } + } public interface IComponentInputData diff --git a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs index 9d63b0a7687704c71d5a8cd56c16c076140df8e9..4cfcd82346d26409c6b6d83debbc52805352f51b 100644 --- a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs +++ b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs @@ -417,5 +417,7 @@ namespace TUGraz.VectoCommon.InputData string Source { get; } Second DriverAccelerationLookBackInterval { get; } MeterPerSquareSecond DriverAccelerationThresholdLow { get; } + double RatioEarlyUpshiftFC { get; } + double RatioEarlyDownshiftFC { get; } } } diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs index 13c543e8a6907f4b636c09c5db939e04b7e728b1..408ead62f100c85e22535b547c10dc054c9d7cc0 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs @@ -158,6 +158,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return ""; } } + public string ShiftStrategy + { + get { return ""; } + } + public bool ExemptedVehicle { get { return false; } } public string VIN diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs index 9f8eb973a8249e06919760fee2edd79dffa13852..2084245631205b2bc3d52d698883c93a97e31ea3 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs @@ -356,6 +356,17 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return _jobname; } } + public string ShiftStrategy + { + get { + if (Body["ShiftStrategy"] == null) { + return ""; + } + + return Body.GetEx<string>("ShiftStrategy"); + } + } + #endregion #region DriverInputData diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs index 03987cd952ad548c7c59894682ef3b639ea69c21..51d16192d292c0ef323281a583001653907b8381 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs @@ -166,6 +166,20 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public Second DriverAccelerationLookBackInterval { get {return Body.GetEx<double>("DriverAccelerationLookBackInterval").SI<Second>();} } public MeterPerSquareSecond DriverAccelerationThresholdLow { get { return Body.GetEx<double>("DriverAccelerationThresholdLow").SI<MeterPerSquareSecond>(); } } + public double RatioEarlyUpshiftFC + { + get { + return Body.GetEx<double>("RatioEarlyUpshiftFC"); + } + } + + public double RatioEarlyDownshiftFC + { + get { + return Body.GetEx<double>("RatioEarlyDownshiftFC"); + } + } + #endregion } } diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationJobInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationJobInputDataProvider.cs index b56d9901b20f24f1c547a046284717c4ba14d38a..4f64a7a626bae274a2692b59c542ef46cc65981d 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationJobInputDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationJobInputDataProvider.cs @@ -61,5 +61,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration { get { return GetAttributeValue("", XMLNames.Component_ID_Attr); } } + + public string ShiftStrategy { get { return ""; } } } } diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringJobInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringJobInputDataProvider.cs index 00422ad3273f990731e7fcdc81665e7296c2f9cb..0d7e74e54a8a984b06605549b0cdf5f9ea6812dc 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringJobInputDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringJobInputDataProvider.cs @@ -155,6 +155,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering } } + public string ShiftStrategy { get { return ""; } } + public double TorqueReserve { get { diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs index 9bb39d77b77ab9885487d1ee3df637a493608d33..e4c210b64c93831302334d79792b292e31dbf6f1 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs @@ -448,7 +448,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter EngineSpeedHighLookupReader.ReadFromStream( RessourceHelper.ReadStream( DeclarationData.DeclarationDataResourcePrefix + ".GearshiftParameters.ShareEngineSpeedHigh.csv") - ) + ), + //--------------- + RatioEarlyUpshiftFC = gsInputData.RatioEarlyUpshiftFC, + RatioEarlyDownshiftFC = gsInputData.RatioEarlyDownshiftFC, }; return retVal; diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs index 260507b44832c79a31777f1ecfc8faf0dc29039b..7c4963e86730f53847357afe17a490bd30a8afb1 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs @@ -225,7 +225,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl : _ptoTransmissionData, InputDataHash = InputDataProvider.XMLHash, SimulationType = SimulationType.DistanceCycle, - GearshiftParameters = _gearshiftData + GearshiftParameters = _gearshiftData, + ShiftStrategy = InputDataProvider.JobInputData.ShiftStrategy }; simulationRunData.EngineData.FuelConsumptionCorrectionFactor = DeclarationData.WHTCCorrection.Lookup( mission.MissionType.GetNonEMSMissionType(), _engineData.WHTCRural, _engineData.WHTCUrban, diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs index db764ae1732906288372f9c94537268f7e3b0809..e20196f7ba5e7da2fa0dd0bca67e4c4ef21f0121 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs @@ -96,7 +96,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl Cycle = new DrivingCycleProxy(drivingCycle, cycle.Name), ExecutionMode = ExecutionMode.Engineering, SimulationType = SimulationType.DistanceCycle | SimulationType.MeasuredSpeedCycle | SimulationType.PWheel, - GearshiftParameters = dao.CreateGearshiftData(InputDataProvider.GearshiftInputData) + GearshiftParameters = dao.CreateGearshiftData(InputDataProvider.GearshiftInputData), + ShiftStrategy = InputDataProvider.JobInputData.ShiftStrategy }; }); } diff --git a/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs b/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs index 38c9e8c24977f394fe79452bb42ff49d7784f4e7..558212436fabcfce159aa965b686061181ea3751 100644 --- a/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs +++ b/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs @@ -122,7 +122,7 @@ namespace TUGraz.VectoCore.Models.Connector.Ports.Impl public Meter MaxDistance { get; set; } } - internal class ResponseDryRun : AbstractResponse + public class ResponseDryRun : AbstractResponse { public Watt DeltaFullLoad { get; set; } public Watt DeltaDragLoad { get; set; } diff --git a/VectoCore/VectoCore/Models/Simulation/Data/ShiftStrategyParameters.cs b/VectoCore/VectoCore/Models/Simulation/Data/ShiftStrategyParameters.cs index d79c2f37ffffd281787646f68e25df6a58dab08a..dd4723ff3789c1c77dce90d4e3f2c348a7d16311 100644 --- a/VectoCore/VectoCore/Models/Simulation/Data/ShiftStrategyParameters.cs +++ b/VectoCore/VectoCore/Models/Simulation/Data/ShiftStrategyParameters.cs @@ -47,5 +47,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Data { public double TargetSpeedDeviationFactor { get; set; } public double RatingFactorCurrentGear { get; set; } public MeterPerSquareSecond DriverAccelerationThresholdLow { get; set; } + public double RatioEarlyDownshiftFC { get; set; } + public double RatioEarlyUpshiftFC { get; set; } } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/Simulation/Data/VectoRunData.cs b/VectoCore/VectoCore/Models/Simulation/Data/VectoRunData.cs index 847a1d87399713d41f4d9eca9df1ade34f6e7e38..d72b19ce517741ea88e11e599987097a1c0a3fd0 100644 --- a/VectoCore/VectoCore/Models/Simulation/Data/VectoRunData.cs +++ b/VectoCore/VectoCore/Models/Simulation/Data/VectoRunData.cs @@ -118,6 +118,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Data public ShiftStrategyParameters GearshiftParameters { get; set; } public bool Exempted { get; set; } + public string ShiftStrategy { get; set; } + public class AuxData { // ReSharper disable once InconsistentNaming diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs index 6ff9331e24c6fd031a88310f95686224b9965114..213f83f132daa935c46eaa83ec318666bba2103b 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs @@ -81,6 +81,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl get { return new GearInfo(_nextGear, false); } } + public static string Name { get { return "Classic AMT shift strategy (shift lines)"; } } + public override uint Engage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity) { while (_nextGear > 1 && SpeedTooLowForEngine(_nextGear, outAngularVelocity)) { diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyV2.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyV2.cs index 54038c4c53c2b2b86278262ea31e61fdfb960260..b5fba13cc1a62da390de845d22aa664ce6c9a229 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyV2.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyV2.cs @@ -63,6 +63,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { PowertrainConfig = data; ShiftStrategyParameters = data.GearshiftParameters; + if (ShiftStrategyParameters == null) { + throw new VectoException("Parameters for shift strategy missing!"); + } // create a dummy powertrain for pre-processing and estimatins var modData = new ModalDataContainer(data, null, null, false); @@ -272,8 +275,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl PowertrainConfig.EngineData.FullLoadCurves[0].N95hSpeed; if (!(gradientBelowMaxGrad && engineSpeedAboveMin && engineSpeedBelowMax)) { - - return new GearRating(GearRatingCase.E, 0, null); ; + return new GearRating(GearRatingCase.E, 0, null); } return RatingGear( @@ -710,6 +712,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl get { return new GearInfo(_nextGear, true); } } + public static string Name { get { return "ACEA TCU"; } } + #endregion public void WriteModalResults(IModalDataContainer container) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs index c023f14c3090012280b64dff62e85660811d3042..ebd51e98a3fc046c25ce41b676816f515b86f36c 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs @@ -35,6 +35,7 @@ using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.Models.Connector.Ports.Impl; +using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.DataBus; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; @@ -63,7 +64,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl get { return new GearInfo(_nextGear.Gear, _nextGear.TorqueConverterLocked); } } - public ATShiftStrategy(GearboxData data, IDataBus dataBus) : base(data, dataBus) {} + public static string Name { get { return "Classic AT shift strategy"; } } + + public ATShiftStrategy(VectoRunData data, IDataBus dataBus) : base(data.GearboxData, dataBus) {} public override uint InitGear(Second absTime, Second dt, NewtonMeter torque, PerSecond outAngularVelocity) { diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/MTShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/MTShiftStrategy.cs index 000b90c2a9d5c95414934dfe63173c924221e6b1..6e87e0bb7b536aa12ac9d7d7c2afaf72ad78de18 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/MTShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/MTShiftStrategy.cs @@ -41,5 +41,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl EarlyShiftUp = false; SkipGears = true; } + + public new static string Name { get { return "MT Shift Strategy"; } } } } \ No newline at end of file diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index 64684eeba75e00e739c3795393e5aabe5cd058e3..d7fdf76c9a8758d20a357f038ca85f1cb9569ec8 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -196,6 +196,7 @@ <Compile Include="Models\SimulationComponent\ILossMap.cs" /> <Compile Include="Models\SimulationComponent\Data\PTOLossMap.cs" /> <Compile Include="Models\SimulationComponent\Impl\AbstractGearbox.cs" /> + <Compile Include="Models\SimulationComponent\Impl\AMTShiftStrategyOptimized.cs" /> <Compile Include="Models\SimulationComponent\Impl\AMTShiftStrategyV2.cs" /> <Compile Include="Models\SimulationComponent\Impl\ATGearbox.cs" /> <Compile Include="Models\SimulationComponent\Impl\ATShiftStrategy.cs" /> diff --git a/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs b/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs index d109d61588b3dc75d7911dc94eaa2b696d0f10b6..5b4101d875c4fa3cca4682748d668f9910adb4b2 100644 --- a/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs +++ b/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs @@ -119,7 +119,7 @@ namespace TUGraz.VectoCore.Tests.Integration .AddComponent(new Brakes(container)) .AddComponent(new AxleGear(container, axleGearData)) .AddComponent(new DummyRetarder(container)) - .AddComponent(new ATGearbox(container, new ATShiftStrategy(gearboxData, container), runData)) + .AddComponent(new ATGearbox(container, new ATShiftStrategy(runData, container), runData)) .AddComponent(engine); var aux = new EngineAuxiliary(container);