diff --git a/Build/CommonSettings.targets b/Build/CommonSettings.targets index 3e2ec287de5b569d6a4bae09690ed17121dcd97a..8c96f6da905038abb2bb7f926d886ed486ed927b 100644 --- a/Build/CommonSettings.targets +++ b/Build/CommonSettings.targets @@ -1,6 +1,6 @@ <Project DefaultTargets = "Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" > <PropertyGroup> - <DefineConstants>$(DefineConstants),RELEASE_CANDIDATE</DefineConstants> + <!-- <DefineConstants>$(DefineConstants),RELEASE_CANDIDATE</DefineConstants> --> <!-- <DefineConstants>$(DefineConstants),CERTIFICATION_RELEASE</DefineConstants> --> </PropertyGroup> </Project> \ No newline at end of file diff --git a/VECTO/GUI/GearboxForm.vb b/VECTO/GUI/GearboxForm.vb index f9773145ce3eb697dff3e39d2822d431c55e1b94..cea7cc82bfeabb71bc1026d1767412778d42642e 100644 --- a/VECTO/GUI/GearboxForm.vb +++ b/VECTO/GUI/GearboxForm.vb @@ -23,9 +23,13 @@ Imports TUGraz.VectoCore.InputData.FileIO.JSON Imports TUGraz.VectoCore.InputData.Impl Imports TUGraz.VectoCore.InputData.Reader Imports TUGraz.VectoCore.Models.Declaration +Imports TUGraz.VectoCore.Models.Simulation.Data +Imports TUGraz.VectoCore.Models.Simulation.Impl +Imports TUGraz.VectoCore.Models.SimulationComponent Imports TUGraz.VectoCore.Models.SimulationComponent.Data Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Engine Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox +Imports TUGraz.VectoCore.Models.SimulationComponent.Impl Imports TUGraz.VectoCore.OutputData.FileIO Imports TUGraz.VectoCore.OutputData.XML Imports TUGraz.VectoCore.Utils @@ -828,7 +832,7 @@ Public Class GearboxForm 'Dim fullLoadCurve As FullLoadCurve = ConvertToFullLoadCurve(FLD0.LnU, FLD0.LTq) Dim gears As IList(Of ITransmissionInputData) = ConvertToGears(LvGears.Items) - Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear) + Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear, inputData.JobInputData.ShiftStrategy) If (Not IsNothing(shiftLines)) Then @@ -897,8 +901,7 @@ Public Class GearboxForm End Sub - Private Function GetShiftLines(ByVal idleSpeed As PerSecond, engineFullLoadCurve As EngineFullLoadCurve, - vehicle As IVehicleEngineeringInputData, gears As IList(Of ITransmissionInputData), ByVal gear As Integer) _ + Private Function GetShiftLines(idleSpeed As PerSecond, engineFullLoadCurve As EngineFullLoadCurve, vehicle As IVehicleEngineeringInputData, gears As IList(Of ITransmissionInputData), gear As Integer, shiftStrategy As String) _ As ShiftPolygon Dim maxTqStr As String = LvGears.Items(gear).SubItems(GearboxTbl.MaxTorque).Text Dim engine As CombustionEngineData = ConvertToEngineData(engineFullLoadCurve, idleSpeed, gear, @@ -918,7 +921,17 @@ Public Class GearboxForm If (rDyn.IsEqual(0)) Then Return Nothing End If - Dim shiftLines As ShiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon( + + Dim tmpRunData as VectoRunData = New VectoRunData() With { + .ShiftStrategy = shiftStrategy, + .GearboxData = New GearboxData() with { + .Type = CType(CbGStype.SelectedValue, GearboxType) + } + } + Dim tmpStrategy as IShiftStrategy = PowertrainBuilder.GetShiftStrategy(tmpRunData, new SimplePowertrainContainer(tmpRunData)) + + + Dim shiftLines As ShiftPolygon = tmpStrategy.ComputeDeclarationShiftPolygon( CType(CbGStype.SelectedValue, GearboxType), gear - 1, engine.FullLoadCurves(CType(gear, UInteger)), gears, engine, Double.Parse(LvGears.Items(0).SubItems(GearboxTbl.Ratio).Text, CultureInfo.InvariantCulture), @@ -1062,7 +1075,7 @@ Public Class GearboxForm If VectoJobForm.Visible AndAlso engine.IdleSpeed > 0 Then Dim gears As IList(Of ITransmissionInputData) = ConvertToGears(LvGears.Items) - Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear) + Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear, inputData.JobInputData.ShiftStrategy) If (Not IsNothing(shiftLines)) Then ShiftPolygonExport.WriteShiftPolygon(shiftLines, jobFile & "_Gear " & gear & ".vgbs") End If diff --git a/VECTO/Input Files/Gearbox.vb b/VECTO/Input Files/Gearbox.vb index 4ffe936751a56af3e811c1ee06b4d60799a63f05..32aeda58c67bc22198ac8e9cfe0c652f42323629 100644 --- a/VECTO/Input Files/Gearbox.vb +++ b/VECTO/Input Files/Gearbox.vb @@ -233,7 +233,7 @@ Public Class Gearbox End Try axlegearData = doa.CreateAxleGearData(gearbox) - gearboxData = doa.CreateGearboxData(gearbox, engine, axlegearData.AxleGear.Ratio, rdyn, vehiclecategory) + gearboxData = doa.CreateGearboxData(gearbox, engine, axlegearData.AxleGear.Ratio, rdyn, vehiclecategory, Nothing) End If Dim result As IList(Of ValidationResult) = diff --git a/VECTO/install.ini b/VECTO/install.ini new file mode 100644 index 0000000000000000000000000000000000000000..889ebb30c2531b0747a1a685d51efa775cb895e4 --- /dev/null +++ b/VECTO/install.ini @@ -0,0 +1,8 @@ +### +### In case you want to run VECTO as 'installed' Application +### remove the comment character (#) at the beginning of the line +### starting with 'ExecutionMode'. +### As installed Application VECTO will not write configuration files +### nor log files to the application's folder. +### +#ExecutionMode = install \ No newline at end of file diff --git a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs index a408abbce5095f25fdc26f55a7c31e4fadd4b713..e8b668db36e9d4d0e3f6e42992399c10a139edc4 100644 --- a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs +++ b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs @@ -400,16 +400,16 @@ namespace TUGraz.VectoCommon.InputData MeterPerSecond StartSpeed { get; } MeterPerSquareSecond StartAcceleration { get; } Second GearResidenceTime { get; } - double DnT99LHMin1 { get; } - double DnT99LHMin2 { get; } - int AllowedGearRangeUp { get; } - int AllowedGearRangeDown { get; } + double? DnT99LHMin1 { get; } + double? DnT99LHMin2 { get; } + int? AllowedGearRangeUp { get; } + int? AllowedGearRangeDown { get; } Second LookBackInterval { get; } Watt AvgCardanPowerThresholdPropulsion { get; } Watt CurrCardanPowerThresholdPropulsion { get; } - double TargetSpeedDeviationFactor { get; } - double EngineSpeedHighDriveOffFactor { get; } - double RatingFactorCurrentGear { get; } + double? TargetSpeedDeviationFactor { get; } + double? EngineSpeedHighDriveOffFactor { get; } + double? RatingFactorCurrentGear { get; } TableData AccelerationReserveLookup { get; } TableData ShareTorque99L { get; } TableData PredictionDurationLookup { get; } @@ -418,8 +418,8 @@ namespace TUGraz.VectoCommon.InputData string Source { get; } Second DriverAccelerationLookBackInterval { get; } MeterPerSquareSecond DriverAccelerationThresholdLow { get; } - double RatioEarlyUpshiftFC { get; } - double RatioEarlyDownshiftFC { get; } + double? RatioEarlyUpshiftFC { get; } + double? RatioEarlyDownshiftFC { get; } TableData LoadStageShiftLines { get; } IList<double> LoadStageThresoldsUp { get; } diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs index 97be1202021fb818f98c414956204399b7cf9d33..b207c68cac4e5703370651c300f6f8318a26e522 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs @@ -17,81 +17,81 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public MeterPerSecond StartSpeed { - get { return Body.GetEx<double>("StartSpeed").KMPHtoMeterPerSecond(); } + get { return Body.GetValueOrDefault<double>("StartSpeed")?.KMPHtoMeterPerSecond(); } } public MeterPerSquareSecond StartAcceleration { - get { return Body.GetEx<double>("StartAcceleration").SI<MeterPerSquareSecond>(); } + get { return Body.GetValueOrDefault<double>("StartAcceleration")?.SI<MeterPerSquareSecond>(); } } public Second GearResidenceTime { - get { return Body.GetEx<double>("GearResidenceTime").SI<Second>(); } + get { return Body.GetValueOrDefault<double>("GearResidenceTime")?.SI<Second>(); } } - public double DnT99LHMin1 + public double? DnT99LHMin1 { - get { return Body.GetEx<double>("Dn_Tq99L_high_min_1"); } + get { return Body.GetValueOrDefault<double>("Dn_Tq99L_high_min_1"); } } - public double DnT99LHMin2 + public double? DnT99LHMin2 { - get { return Body.GetEx<double>("Dn_Tq99L_high_min_2"); } + get { return Body.GetValueOrDefault<double>("Dn_Tq99L_high_min_2"); } } - public int AllowedGearRangeUp + public int? AllowedGearRangeUp { - get { return Body.GetEx<int>("GearRangeUp"); } + get { return Body.GetValueOrDefault<int>("GearRangeUp"); } } - public int AllowedGearRangeDown + public int? AllowedGearRangeDown { - get { return Body.GetEx<int>("GearRangeDown"); } + get { return Body.GetValueOrDefault<int>("GearRangeDown"); } } public Second LookBackInterval { - get { return Body.GetEx<double>("LookBackDriver").SI<Second>(); } + get { return Body.GetValueOrDefault<double>("LookBackDriver")?.SI<Second>(); } } public Watt AvgCardanPowerThresholdPropulsion { - get { return Body.GetEx<double>("P_card_avg_threshold").SI<Watt>(); } + get { return Body.GetValueOrDefault<double>("P_card_avg_threshold")?.SI<Watt>(); } } public Watt CurrCardanPowerThresholdPropulsion { - get { return Body.GetEx<double>("P_card_curr_threshold").SI<Watt>(); } + get { return Body.GetValueOrDefault<double>("P_card_curr_threshold")?.SI<Watt>(); } } - public double TargetSpeedDeviationFactor + public double? TargetSpeedDeviationFactor { - get { return Body.GetEx<double>("Diff_curr_targ_vel"); } + get { return Body.GetValueOrDefault<double>("Diff_curr_targ_vel"); } } - public double EngineSpeedHighDriveOffFactor + public double? EngineSpeedHighDriveOffFactor { - get { return Body.GetEx<double>("EngineSpeedHighDriveOffFactor"); } + get { return Body.GetValueOrDefault<double>("EngineSpeedHighDriveOffFactor"); } } - public double RatingFactorCurrentGear + public double? RatingFactorCurrentGear { - get { return Body.GetEx<double>("Rating_current_gear"); } + get { return Body.GetValueOrDefault<double>("Rating_current_gear"); } } public TableData AccelerationReserveLookup { get { try { - return ReadTableData(Body.GetEx<string>("AccelerationReserveLookup"), "AccelerationReserveLookup"); + return ReadTableData(Body["AccelerationReserveLookup"]?.ToString(), "AccelerationReserveLookup", false); } catch (Exception) { if (!TolerateMissing) { throw; } return new TableData( - Path.Combine(BasePath, Body["AccelerationReserveLookup"].ToString()) + MissingFileSuffix, + Path.Combine(BasePath, Body["AccelerationReserveLookup"]?.ToString() ?? "") + MissingFileSuffix, DataSourceType.Missing); } } @@ -101,14 +101,14 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON { get { try { - return ReadTableData(Body.GetEx<string>("ShareTorque99L"), "ShareTorque99L"); + return ReadTableData(Body["ShareTorque99L"]?.ToString(), "ShareTorque99L", false); } catch (Exception) { if (!TolerateMissing) { throw; } return new TableData( - Path.Combine(BasePath, Body["ShareTorque99L"].ToString()) + MissingFileSuffix, + Path.Combine(BasePath, Body["ShareTorque99L"]?.ToString() ?? "") + MissingFileSuffix, DataSourceType.Missing); } } @@ -118,14 +118,14 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON { get { try { - return ReadTableData(Body.GetEx<string>("PredictionDurationLookup"), "PredictionDurationLookup"); + return ReadTableData(Body["PredictionDurationLookup"]?.ToString(), "PredictionDurationLookup", false); } catch (Exception) { if (!TolerateMissing) { throw; } return new TableData( - Path.Combine(BasePath, Body["PredictionDurationLookup"].ToString()) + MissingFileSuffix, + Path.Combine(BasePath, Body["PredictionDurationLookup"]?.ToString() ?? "") + MissingFileSuffix, DataSourceType.Missing); } } @@ -135,14 +135,14 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON { get { try { - return ReadTableData(Body.GetEx<string>("ShareIdleLow"), "ShareIdleLow"); + return ReadTableData(Body["ShareIdleLow"]?.ToString(), "ShareIdleLow", false); } catch (Exception) { if (!TolerateMissing) { throw; } return new TableData( - Path.Combine(BasePath, Body["ShareIdleLow"].ToString()) + MissingFileSuffix, + Path.Combine(BasePath, Body["ShareIdleLow"]?.ToString() ?? "") + MissingFileSuffix, DataSourceType.Missing); } } @@ -152,33 +152,33 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON { get { try { - return ReadTableData(Body.GetEx<string>("ShareEngineHigh"), "ShareEngineHigh"); + return ReadTableData(Body["ShareEngineHigh"]?.ToString(), "ShareEngineHigh", false); } catch (Exception) { if (!TolerateMissing) { throw; } return new TableData( - Path.Combine(BasePath, Body["ShareEngineHigh"].ToString()) + MissingFileSuffix, + Path.Combine(BasePath, Body["ShareEngineHigh"]?.ToString() ?? "") + MissingFileSuffix, DataSourceType.Missing); } } } - public Second DriverAccelerationLookBackInterval { get {return Body.GetEx<double>("DriverAccelerationLookBackInterval").SI<Second>();} } - public MeterPerSquareSecond DriverAccelerationThresholdLow { get { return Body.GetEx<double>("DriverAccelerationThresholdLow").SI<MeterPerSquareSecond>(); } } + public Second DriverAccelerationLookBackInterval { get {return Body.GetValueOrDefault<double>("DriverAccelerationLookBackInterval")?.SI<Second>();} } + public MeterPerSquareSecond DriverAccelerationThresholdLow { get { return Body.GetValueOrDefault<double>("DriverAccelerationThresholdLow")?.SI<MeterPerSquareSecond>(); } } - public double RatioEarlyUpshiftFC + public double? RatioEarlyUpshiftFC { get { - return Body.GetEx<double>("RatioEarlyUpshiftFC"); + return Body.GetValueOrDefault<double>("RatioEarlyUpshiftFC"); } } - public double RatioEarlyDownshiftFC + public double? RatioEarlyDownshiftFC { get { - return Body.GetEx<double>("RatioEarlyDownshiftFC"); + return Body.GetValueOrDefault<double>("RatioEarlyDownshiftFC"); } } @@ -186,7 +186,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON { get { try { - return ReadTableData(Body.GetEx<string>("LoadStageShiftLines"), "LoadStageShiftLines"); + return ReadTableData(Body["LoadStageShiftLines"]?.ToString(), "LoadStageShiftLines", false); } catch (Exception) { return null; } @@ -195,13 +195,13 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public IList<double> LoadStageThresoldsUp { - get { return Body.GetEx<string>("LoadStageThresoldsUp").Split(';').Select(x => x.ToDouble()).ToList(); } + get { return (Body["LoadStageThresoldsUp"]?.ToString() ?? "").Split(';').Select(x => x.ToDouble(0)).ToList(); } } public IList<double> LoadStageThresoldsDown { get { - return Body.GetEx<string>("LoadStageThresoldsDown").Split(';').Select(x => x.ToDouble()).ToList(); + return (Body["LoadStageThresoldsDown"]?.ToString() ?? "").Split(';').Select(x => x.ToDouble(0)).ToList(); } } diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JsonExtensionMethods.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JsonExtensionMethods.cs index 84533ad49c75ea2fc7406e8566cf96a55c4544d9..a120aba02f6efa64f9b7f245bf00c3b2832ce6ce 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JsonExtensionMethods.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JsonExtensionMethods.cs @@ -29,6 +29,7 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ +using System; using Newtonsoft.Json.Linq; using TUGraz.VectoCommon.Exceptions; @@ -63,5 +64,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON { return GetEx(value, property).Value<T>(); } + + + //public static T GetValueOrDefault<T>(this JToken jtoken, string property, T defaultVal = null) where T : class + //{ + // var val = jtoken[property]; + // return val == null ? defaultVal : val.Value<T>(); + //} + + public static T? GetValueOrDefault<T>(this JToken jtoken, string property) where T : struct + { + var val = jtoken[property]; + return val?.Value<T>(); + } } } \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs index f1f19e74701b2b5a7d1c2a0ffe6a39f58ee03624..704b5462bae04bec3f2391d56d6220a310d8ff72 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs @@ -41,6 +41,7 @@ using TUGraz.VectoCore.InputData.Reader.ComponentData; using TUGraz.VectoCore.InputData.Reader.ShiftStrategy; 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.Engine; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; @@ -170,7 +171,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter internal GearboxData CreateGearboxData( IGearboxEngineeringInputData gearbox, CombustionEngineData engineData, - double axlegearRatio, Meter dynamicTyreRadius, VehicleCategory vehicleCategory) + double axlegearRatio, Meter dynamicTyreRadius, VehicleCategory vehicleCategory, IShiftStrategy shiftStrategy) { if (gearbox.SavedInDeclarationMode) { WarnEngineeringMode("GearboxData"); @@ -202,10 +203,15 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter var shiftPolygon = gear.ShiftPolygon != null && gear.ShiftPolygon.SourceType != DataSourceType.Missing ? ShiftPolygonReader.Create(gear.ShiftPolygon) - : DeclarationData.Gearbox.ComputeShiftPolygon( - gearbox.Type, (int)i, engineData.FullLoadCurves[i + 1], gearbox.Gears, - engineData, - axlegearRatio, dynamicTyreRadius); + : shiftStrategy != null + ? shiftStrategy.ComputeDeclarationShiftPolygon( + gearbox.Type, (int)i, engineData.FullLoadCurves[i + 1], gearbox.Gears, + engineData, + axlegearRatio, dynamicTyreRadius) + : DeclarationData.Gearbox.ComputeShiftPolygon( + gearbox.Type, (int)i, engineData.FullLoadCurves[i + 1], gearbox.Gears, + engineData, + axlegearRatio, dynamicTyreRadius); var gearData = new GearData { ShiftPolygon = shiftPolygon, MaxSpeed = gear.MaxInputSpeed, @@ -412,10 +418,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter StartVelocity = gsInputData.StartSpeed ?? DeclarationData.GearboxTCU.StartSpeed, StartAcceleration = gsInputData.StartAcceleration ?? DeclarationData.GearboxTCU.StartAcceleration, GearResidenceTime = gsInputData.GearResidenceTime ?? DeclarationData.GearboxTCU.GearResidenceTime, - DnT99L_highMin1 = gsInputData.DnT99LHMin1, - DnT99L_highMin2 = gsInputData.DnT99LHMin2, - AllowedGearRangeUp = gsInputData.AllowedGearRangeUp, - AllowedGearRangeDown = gsInputData.AllowedGearRangeDown, + DnT99L_highMin1 = gsInputData.DnT99LHMin1 ?? DeclarationData.GearboxTCU.DnT99L_highMin1, + DnT99L_highMin2 = gsInputData.DnT99LHMin2 ?? DeclarationData.GearboxTCU.DnT99L_highMin2, + AllowedGearRangeUp = gsInputData.AllowedGearRangeUp ?? DeclarationData.GearboxTCU.AllowedGearRangeUp, + AllowedGearRangeDown = gsInputData.AllowedGearRangeDown ?? DeclarationData.GearboxTCU.AllowedGearRangeDown, LookBackInterval = gsInputData.LookBackInterval ?? DeclarationData.GearboxTCU.LookBackInterval, DriverAccelerationLookBackInterval = gsInputData.DriverAccelerationLookBackInterval ?? DeclarationData.GearboxTCU.DriverAccelerationLookBackInterval, DriverAccelerationThresholdLow = gsInputData.DriverAccelerationThresholdLow ?? DeclarationData.GearboxTCU.DriverAccelerationThresholdLow, @@ -423,9 +429,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter DeclarationData.GearboxTCU.AverageCardanPowerThresholdPropulsion, CurrentCardanPowerThresholdPropulsion = gsInputData.CurrCardanPowerThresholdPropulsion ?? DeclarationData.GearboxTCU.CurrentCardanPowerThresholdPropulsion, - TargetSpeedDeviationFactor = gsInputData.TargetSpeedDeviationFactor, - EngineSpeedHighDriveOffFactor = gsInputData.EngineSpeedHighDriveOffFactor, - RatingFactorCurrentGear = gsInputData.RatingFactorCurrentGear, + TargetSpeedDeviationFactor = gsInputData.TargetSpeedDeviationFactor ?? DeclarationData.GearboxTCU.TargetSpeedDeviationFactor, + EngineSpeedHighDriveOffFactor = gsInputData.EngineSpeedHighDriveOffFactor ?? DeclarationData.GearboxTCU.EngineSpeedHighDriveOffFactor, + RatingFactorCurrentGear = gsInputData.RatingFactorCurrentGear ?? DeclarationData.GearboxTCU.RatingFactorCurrentGear, AccelerationReserveLookup = AccelerationReserveLookupReader.Create(gsInputData.AccelerationReserveLookup) ?? AccelerationReserveLookupReader.ReadFromStream( RessourceHelper.ReadStream( @@ -450,8 +456,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter DeclarationData.DeclarationDataResourcePrefix + ".GearshiftParameters.ShareEngineSpeedHigh.csv") ), //--------------- - RatioEarlyUpshiftFC = gsInputData.RatioEarlyUpshiftFC, - RatioEarlyDownshiftFC = gsInputData.RatioEarlyDownshiftFC, + RatioEarlyUpshiftFC = gsInputData.RatioEarlyUpshiftFC ?? 0, + RatioEarlyDownshiftFC = gsInputData.RatioEarlyDownshiftFC ?? 0, // voith gs parameters diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs index e20196f7ba5e7da2fa0dd0bca67e4c4ef21f0121..d21c9b448953bddeda4e6011df4f80cb09ca8de4 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs @@ -36,7 +36,9 @@ using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter; using TUGraz.VectoCore.Models.Simulation.Data; +using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Impl; [assembly: InternalsVisibleTo("VectoCoreTest")] @@ -68,8 +70,15 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl var tempVehicle = dao.CreateVehicleData(vehicle); var axlegearData = dao.CreateAxleGearData(vehicle.AxleGearInputData); + var tmpRunData = new VectoRunData() { + ShiftStrategy = InputDataProvider.JobInputData.ShiftStrategy, + GearboxData = new GearboxData() { + Type = vehicle.GearboxInputData.Type, + } + }; + var tmpStrategy = PowertrainBuilder.GetShiftStrategy(tmpRunData, new SimplePowertrainContainer(tmpRunData)); var gearboxData = dao.CreateGearboxData(vehicle.GearboxInputData, engineData, axlegearData.AxleGear.Ratio, - tempVehicle.DynamicTyreRadius,tempVehicle.VehicleCategory); + tempVehicle.DynamicTyreRadius,tempVehicle.VehicleCategory, tmpStrategy); var crossWindRequired = vehicle.AirdragInputData.CrossWindCorrectionMode == CrossWindCorrectionMode.VAirBetaLookupTable; var angledriveData = dao.CreateAngledriveData(vehicle.AngledriveInputData); diff --git a/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/AccelerationReserveLookupReader.cs b/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/AccelerationReserveLookupReader.cs index b346dabecce2763aa3fbfa164385ff2971d6b2f4..a21c8ef7cf57bd1c1dcdb3566e9574f903f06a2d 100644 --- a/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/AccelerationReserveLookupReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/AccelerationReserveLookupReader.cs @@ -28,6 +28,9 @@ namespace TUGraz.VectoCore.InputData.Reader.ShiftStrategy public static IAccelerationReserveLookup Create(TableData data) { + if (data == null) { + return null; + } return new AccelerationReserveLookup( new LookupDataReader<MeterPerSecond, Tuple<MeterPerSquareSecond, MeterPerSquareSecond>>( "AcceleationReserve", new[] { Fields.Velocity, Fields.AccelerationReserveLow, Fields.AccelerationReserveHigh }, 3) diff --git a/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/EngineSpeedHighLookupReader.cs b/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/EngineSpeedHighLookupReader.cs index 07f561bbf6bcf677efc5d095645009d02868057e..c9a6f2ea009e6a18ebcdd4fcabee5829b8f29014 100644 --- a/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/EngineSpeedHighLookupReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/EngineSpeedHighLookupReader.cs @@ -15,6 +15,9 @@ namespace TUGraz.VectoCore.InputData.Reader.ShiftStrategy public static IEngineSpeedHighFactorLookup Create(TableData data) { + if (data == null) { + return null; + } return new EngineSpeedHighFactorLookup( new LookupDataReader<double, double>("EngineSpeedHighFactor", new[] { Fields.TorqueRatio, Fields.SpeedFactor }) .Create( diff --git a/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/PredictionDurationLookupReader.cs b/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/PredictionDurationLookupReader.cs index 49437c38259b903a4c035bd2edd3816068811b60..f83c18a75bf5c53826878d7bd7335ea9b8bda78b 100644 --- a/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/PredictionDurationLookupReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/PredictionDurationLookupReader.cs @@ -33,7 +33,9 @@ namespace TUGraz.VectoCore.InputData.Reader.ShiftStrategy public static PredictionDurationLookup Create(TableData data) { - + if (data == null) { + return null; + } return new PredictionDurationLookup( new LookupDataReader<double, double>( "ShiftStrategy PredictionDuration", new[] { Fields.SpeedRatio, Fields.PredictionTimeRatio }) diff --git a/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/ShareIdleLowReader.cs b/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/ShareIdleLowReader.cs index 2312545078a5979062fc97c43cd36b1524280acd..078fc763bb92fd136997d1cde74fce17f7aba2f3 100644 --- a/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/ShareIdleLowReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/ShareIdleLowReader.cs @@ -32,6 +32,9 @@ namespace TUGraz.VectoCore.InputData.Reader.ShiftStrategy public static ShareIdleLowLookup Create(TableData data) { + if (data == null) { + return null; + } return new ShareIdleLowLookup( new LookupDataReader<MeterPerSecond, double>( "ShiftStrategy IdleLow", new[] { Fields.Velocity, Fields.WeightingFactor }) diff --git a/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/ShareTorque99lLookupReader.cs b/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/ShareTorque99lLookupReader.cs index 652742166c0f5faea5b07ead3f7b570aa5af85a2..2fbdc5da36f9c690a8cb4c11a063dc5c7d192d58 100644 --- a/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/ShareTorque99lLookupReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/ShiftStrategy/ShareTorque99lLookupReader.cs @@ -16,6 +16,9 @@ namespace TUGraz.VectoCore.InputData.Reader.ShiftStrategy public static IShareTorque99lLookup Create(TableData data) { + if (data == null) { + return null; + } return new ShareTorque99lLookup( new LookupDataReader<MeterPerSecond, double>("Share T_99l", new[] { Fields.Velocity, Fields.ShareT99l }) .Create(data, x => x.ParseDouble(Fields.Velocity).KMPHtoMeterPerSecond(), y => y.ParseDouble(Fields.ShareT99l)) diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs index fc9c7af5e5792be7cc075b3fcd975c31e58d3d27..df2ac1628a23620a2a06cc1c11546787c293c4ad 100644 --- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs +++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs @@ -236,10 +236,10 @@ namespace TUGraz.VectoCore.Models.Declaration IList<ITransmissionInputData> gears, CombustionEngineData engine, double axlegearRatio, Meter dynamicTyreRadius) { switch (type) { + case GearboxType.AMT: + //return ComputeEfficiencyShiftPolygon(gearIdx, fullLoadCurve, gears, engine, axlegearRatio, dynamicTyreRadius); case GearboxType.MT: return ComputeManualTransmissionShiftPolygon(gearIdx, fullLoadCurve, gears, engine, axlegearRatio, dynamicTyreRadius); - case GearboxType.AMT: - return ComputeEfficiencyShiftPolygon(gearIdx, fullLoadCurve, gears, engine, axlegearRatio, dynamicTyreRadius); case GearboxType.ATSerial: case GearboxType.ATPowerSplit: return TorqueConverter.ComputeShiftPolygon(fullLoadCurve, gearIdx == 0, gearIdx >= gears.Count - 1); @@ -253,7 +253,7 @@ namespace TUGraz.VectoCore.Models.Declaration : ComputeManualTransmissionShiftPolygon(gearIdx, fullLoadCurve, gears, engine, axlegearRatio, dynamicTyreRadius); } - private static ShiftPolygon ComputeEfficiencyShiftPolygon(int gearIdx, EngineFullLoadCurve fullLoadCurve, IList<ITransmissionInputData> gears, CombustionEngineData engine, double axlegearRatio, Meter dynamicTyreRadius) + public static ShiftPolygon ComputeEfficiencyShiftPolygon(int gearIdx, EngineFullLoadCurve fullLoadCurve, IList<ITransmissionInputData> gears, CombustionEngineData engine, double axlegearRatio, Meter dynamicTyreRadius) { if (gears.Count < 2) { throw new VectoException("ComputeShiftPolygon needs at least 2 gears. {0} gears given.", gears.Count); diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs index 22fda1ad32151ccf707e87fddc8e92b22134ea43..c9fd8ed74d176515e644ef68367ef0d05d848281 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs @@ -31,11 +31,13 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; +using TUGraz.VectoCore.InputData.Reader; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.DataBus; @@ -64,7 +66,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl Tuple.Create<GbxTypeList, string, string ,StrategyCreator>(new GbxTypeList {GearboxType.MT}, typeof(MTShiftStrategy).FullName, MTShiftStrategy.Name, (r, c) => new MTShiftStrategy(r, c)), Tuple.Create<GbxTypeList, string, string, StrategyCreator>( new GbxTypeList {GearboxType.AMT}, typeof(AMTShiftStrategy).FullName,AMTShiftStrategy.Name, (r, c) => new AMTShiftStrategy(r, c)), Tuple.Create<GbxTypeList, string, string, StrategyCreator>( new GbxTypeList {GearboxType.AMT}, typeof(AMTShiftStrategyOptimized).FullName, AMTShiftStrategyOptimized.Name, (r, c) => new AMTShiftStrategyOptimized(r, c)), - Tuple.Create<GbxTypeList, string, string, StrategyCreator>( new GbxTypeList {GearboxType.AMT}, typeof(AMTShiftStrategyV2).FullName, AMTShiftStrategyV2.Name, (r, c) => new AMTShiftStrategyV2(r, c)), + Tuple.Create<GbxTypeList, string, string, StrategyCreator>( new GbxTypeList {GearboxType.AMT}, typeof(AMTShiftStrategyACEA).FullName, AMTShiftStrategyACEA.Name, (r, c) => new AMTShiftStrategyACEA(r, c)), Tuple.Create<GbxTypeList, string, string, StrategyCreator>( new GbxTypeList {GearboxType.ATPowerSplit, GearboxType.ATSerial}, typeof(ATShiftStrategy).FullName, ATShiftStrategy.Name, (r, c) => new ATShiftStrategy(r, c)), Tuple.Create<GbxTypeList, string, string, StrategyCreator>( new GbxTypeList {GearboxType.ATPowerSplit, GearboxType.ATSerial}, typeof(ATShiftStrategyVoith).FullName, ATShiftStrategyVoith.Name, (r, c) => new ATShiftStrategyVoith(r, c)), Tuple.Create<GbxTypeList, string, string, StrategyCreator>( new GbxTypeList {GearboxType.ATPowerSplit, GearboxType.ATSerial}, typeof(ATShiftStrategyOptimized).FullName, ATShiftStrategyOptimized.Name, (r, c) => new ATShiftStrategyOptimized(r, c)), @@ -278,18 +280,12 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl public void BuildSimplePowertrain(VectoRunData data, IVehicleContainer container) { - if (data.Cycle.CycleType != CycleType.DistanceBased) { - throw new VectoException("CycleType must be DistanceBased"); - } - - // DistanceBasedDrivingCycle --> driver --> vehicle --> wheels - // --> axleGear --> (retarder) --> gearBox --> (retarder) --> clutch --> engine <-- Aux - - // TODO: MQ 2018-11-19: engineering mode needs AUX power from cycle, use face cycle... - // should be a reference/proxy to the main driving cyle. but how to access it? - container.AddComponent(new DistanceBasedDrivingCycle(container, data.Cycle)); + //if (data.Cycle.CycleType != CycleType.DistanceBased) { + // throw new VectoException("CycleType must be DistanceBased"); + //} - var powertrain = new Vehicle(container, data.VehicleData, data.AirdragData) + var vehicle = new Vehicle(container, data.VehicleData, data.AirdragData); + var powertrain = vehicle .AddComponent(new Wheels(container, data.VehicleData.DynamicTyreRadius, data.VehicleData.WheelsInertia)) .AddComponent(new Brakes(container)) .AddComponent(new AxleGear(container, data.AxleGearData)) @@ -298,6 +294,24 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl if (data.GearboxData.Type.ManualTransmission()) { powertrain = powertrain.AddComponent(new Clutch(container, data.EngineData)); } + // DistanceBasedDrivingCycle --> driver --> vehicle --> wheels + // --> axleGear --> (retarder) --> gearBox --> (retarder) --> clutch --> engine <-- Aux + + // TODO: MQ 2018-11-19: engineering mode needs AUX power from cycle, use face cycle... + // should be a reference/proxy to the main driving cyle. but how to access it? + switch (data.Cycle.CycleType) { + case CycleType.DistanceBased: + container.AddComponent(new DistanceBasedDrivingCycle(container, data.Cycle)); + break; + case CycleType.MeasuredSpeed: + var dummyData = GetMeasuredSpeedDummnCycle(); + var msCycle = new MeasuredSpeedDrivingCycle(container, dummyData); + msCycle.AddComponent(vehicle); + break; + case CycleType.EngineOnly: break; + default: throw new VectoException("Wrong CycleType for SimplePowertrain"); + } + var engine = new CombustionEngine(container, data.EngineData); var idleController = GetIdleController(data.PTO, engine, container); @@ -308,6 +322,21 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl } + private DrivingCycleData GetMeasuredSpeedDummnCycle() + { + var header = "<t>,<v>,<grad>"; + var entries = new[] { "0, 50, 0", "10, 50, 0" }; + var cycleData = new MemoryStream(); + var writer = new StreamWriter(cycleData); + writer.WriteLine(header); + foreach (var entry in entries) { + writer.WriteLine(entry); + } + writer.Flush(); + cycleData.Seek(0, SeekOrigin.Begin); + return DrivingCycleDataReader.ReadFromStream(cycleData, CycleType.MeasuredSpeed, "DummyCycle", false); + } + private static IIdleController GetIdleController(PTOData pto, ICombustionEngine engine, IVehicleContainer container) { var controller = engine.IdleController; @@ -413,12 +442,13 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl } } - private static IShiftStrategy GetShiftStrategy(VectoRunData runData, IVehicleContainer container) + public static IShiftStrategy GetShiftStrategy(VectoRunData runData, IVehicleContainer container) { if (string.IsNullOrWhiteSpace(runData.ShiftStrategy)) { switch (runData.GearboxData.Type) { case GearboxType.AMT: - return new AMTShiftStrategyOptimized(runData, container); + //return new AMTShiftStrategyOptimized(runData, container); + return new AMTShiftStrategy(runData, container); case GearboxType.MT: return new MTShiftStrategy(runData, container); case GearboxType.ATPowerSplit: diff --git a/VectoCore/VectoCore/Models/SimulationComponent/IShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/IShiftStrategy.cs index 2b409ab120f4e86d746ac2143b12a031c7f7c2fe..cfe92505e0a038a73e4ad6e0a3374f83bc192034 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/IShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/IShiftStrategy.cs @@ -29,8 +29,13 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ +using System.Collections.Generic; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.OutputData; namespace TUGraz.VectoCore.Models.SimulationComponent @@ -97,6 +102,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent void WriteModalResults(IModalDataContainer container); + ShiftPolygon ComputeDeclarationShiftPolygon( + GearboxType gearboxType, int i, EngineFullLoadCurve engineDataFullLoadCurve, + IList<ITransmissionInputData> gearboxGears, CombustionEngineData engineData, double axlegearRatio, + Meter dynamicTyreRadius); } public class GearInfo diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs index f6d3bd13ddd91bf5366eb2aebd276a56aad56f18..172ff79658dad7937cff0ed1bf09f3cac9c21754 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs @@ -29,13 +29,19 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ +using System.Collections.Generic; using System.Linq; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.Models.Connector.Ports.Impl; +using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.DataBus; +using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { @@ -51,7 +57,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { EarlyShiftUp = true; SkipGears = true; - + if (runData.EngineData == null) { + return; + } var transmissionRatio = runData.AxleGearData.AxleGear.Ratio * (runData.AngledriveData == null ? 1.0 : runData.AngledriveData.Angledrive.Ratio) / runData.VehicleData.DynamicTyreRadius; @@ -82,6 +90,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl get { return new GearInfo(_nextGear, false); } } + public override ShiftPolygon ComputeDeclarationShiftPolygon( + GearboxType gearboxType, int i, EngineFullLoadCurve engineDataFullLoadCurve, IList<ITransmissionInputData> gearboxGears, + CombustionEngineData engineData, double axlegearRatio, Meter dynamicTyreRadius) + { + return DeclarationData.Gearbox.ComputeManualTransmissionShiftPolygon( + i, engineDataFullLoadCurve, gearboxGears, engineData, axlegearRatio, dynamicTyreRadius); + } + public static string Name { get { return "Classic AMT shift strategy (shift lines)"; } } public override uint Engage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyV2.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyACEA.cs similarity index 97% rename from VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyV2.cs rename to VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyACEA.cs index ce3250d6a8dad3d94afbce9718e8eea197dade3f..d3cfe1b401e88151bddabc6dd618ee7717e27332 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyV2.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyACEA.cs @@ -5,6 +5,7 @@ using System.Diagnostics; using System.Linq; using Microsoft.VisualBasic.CompilerServices; using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; @@ -15,12 +16,14 @@ using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.DataBus; using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.OutputData; using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { - public class AMTShiftStrategyV2 : ShiftStrategy + public class AMTShiftStrategyACEA : ShiftStrategy { private uint _nextGear; protected readonly MaxGradabilityLookup MaxGradability; @@ -61,8 +64,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl } } - public AMTShiftStrategyV2(VectoRunData data, IVehicleContainer dataBus) : base(data.GearboxData, dataBus) + public AMTShiftStrategyACEA(VectoRunData data, IVehicleContainer dataBus) : base(data.GearboxData, dataBus) { + if (data.EngineData == null) { + return; + } PowertrainConfig = data; ShiftStrategyParameters = data.GearshiftParameters; if (ShiftStrategyParameters == null) { @@ -737,5 +743,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl GearRatings.Clear(); accRsv = null; } + + public override ShiftPolygon ComputeDeclarationShiftPolygon( + GearboxType gearboxType, int i, EngineFullLoadCurve engineDataFullLoadCurve, IList<ITransmissionInputData> gearboxGears, + CombustionEngineData engineData, double axlegearRatio, Meter dynamicTyreRadius) + { + return null; + } } } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyOptimized.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyOptimized.cs index b9fdad187ef71fc038215cd000f8bcdaef11176b..297b73e747e33cbd67f925873d2ccbf3af9810b1 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyOptimized.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyOptimized.cs @@ -1,12 +1,17 @@ using System.Collections.Generic; using System.Linq; using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Models.Connector.Ports.Impl; +using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.DataBus; using TUGraz.VectoCore.Models.Simulation.Impl; +using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.OutputData; namespace TUGraz.VectoCore.Models.SimulationComponent.Impl @@ -21,6 +26,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public AMTShiftStrategyOptimized(VectoRunData runData, IDataBus dataBus) : base(runData, dataBus) { + if (runData.EngineData == null) { + return; + } fcMap = runData.EngineData.ConsumptionMap; fld = runData.EngineData.FullLoadCurves; shiftStrategyParameters = runData.GearshiftParameters; @@ -151,5 +159,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl } public new static string Name { get { return "AMT shift strategy w early upshift (FC-based)"; } } + + #region Overrides of AMTShiftStrategy + + public override ShiftPolygon ComputeDeclarationShiftPolygon( + GearboxType gearboxType, int i, EngineFullLoadCurve engineDataFullLoadCurve, IList<ITransmissionInputData> gearboxGears, + CombustionEngineData engineData, double axlegearRatio, Meter dynamicTyreRadius) + { + return DeclarationData.Gearbox.ComputeEfficiencyShiftPolygon(i, engineDataFullLoadCurve, gearboxGears, engineData, axlegearRatio, dynamicTyreRadius); + } + + #endregion } } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs index be2627fa695700f2da82c46cc58de29aadb3220b..50916fab0c3ed0d8c14f9628d8a4ab197a07e355 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs @@ -119,8 +119,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public override IResponse Initialize(NewtonMeter outTorque, PerSecond outAngularVelocity) { if (CurrentState.Disengaged) { - Gear = _strategy.InitGear(0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, outTorque, - outAngularVelocity); + Gear = _strategy?.InitGear(0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, outTorque, + outAngularVelocity) ?? 1; } var inAngularVelocity = 0.SI<PerSecond>(); var inTorque = 0.SI<NewtonMeter>(); diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs index bd028588c3cc3b8f0a9c631defd8eaf065777cfd..db10a43341039cb9e290e949feed7d9fe56b8d88 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs @@ -29,16 +29,20 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.Models.Connector.Ports.Impl; +using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.DataBus; using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.Utils; @@ -66,6 +70,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl get { return new GearInfo(_nextGear.Gear, _nextGear.TorqueConverterLocked); } } + public override ShiftPolygon ComputeDeclarationShiftPolygon( + GearboxType gearboxType, int i, EngineFullLoadCurve engineDataFullLoadCurve, IList<ITransmissionInputData> gearboxGears, + CombustionEngineData engineData, double axlegearRatio, Meter dynamicTyreRadius) + { + return DeclarationData.TorqueConverter.ComputeShiftPolygon(engineDataFullLoadCurve, i == 0, i >= gearboxGears.Count - 1); + } + public static string Name { get { return "Classic AT shift strategy"; } } public ATShiftStrategy(VectoRunData data, IDataBus dataBus) : base(data.GearboxData, dataBus) {} @@ -388,7 +399,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl } } - if (gear > 1 || (gear == 1 && _gearbox.TorqueConverterLocked)) { + if (shiftTimeReached && gear > 1 || (gear == 1 && _gearbox.TorqueConverterLocked)) { var earlyDownshift = CheckEarlyDownshift( absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear, lastShiftTime); if (earlyDownshift.HasValue) { diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategyOptimized.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategyOptimized.cs index 774bd197dd7314347527a4ed20ad98a7ddbb0b27..0d877ce404ee6913e262614c02c61edcb072c16e 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategyOptimized.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategyOptimized.cs @@ -1,11 +1,18 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.Linq; using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Models.Connector.Ports.Impl; +using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.DataBus; using TUGraz.VectoCore.Models.Simulation.Impl; +using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.OutputData; namespace TUGraz.VectoCore.Models.SimulationComponent.Impl @@ -28,6 +35,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public ATShiftStrategyOptimized(VectoRunData runData, IDataBus dataBus) : base(runData, dataBus) { + if (runData.EngineData == null) { + return; + } fcMap = runData.EngineData.ConsumptionMap; fld = runData.EngineData.FullLoadCurves; shiftStrategyParameters = runData.GearshiftParameters; @@ -44,6 +54,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl throw new VectoException("Unknown gearboxtype: {0}", TestContainer.GearboxCtl.GetType().FullName); } + if (runData.Cycle.CycleType == CycleType.MeasuredSpeed) { + try { + TestContainer.GetCycleOutPort().Initialize(); + TestContainer.GetCycleOutPort().Request(0.SI<Second>(), 1.SI<Second>()); + } catch (Exception ) { } + } + } @@ -137,5 +154,32 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl 0.SI<Second>(), dt, outTorque, outAngularVelocity, true); return response; } + + #region Overrides of ATShiftStrategy + + public override ShiftPolygon ComputeDeclarationShiftPolygon( + GearboxType gearboxType, int i, EngineFullLoadCurve engineDataFullLoadCurve, IList<ITransmissionInputData> gearboxGears, + CombustionEngineData engineData, double axlegearRatio, Meter dynamicTyreRadius) + { + var shiftLine = DeclarationData.Gearbox.ComputeEfficiencyShiftPolygon( + Math.Max(i, 2), engineDataFullLoadCurve, gearboxGears, engineData, axlegearRatio, dynamicTyreRadius); + + var upshift = new List<ShiftPolygon.ShiftPolygonEntry>(); + + if (i < gearboxGears.Count - 1) { + + var maxDragTorque = engineDataFullLoadCurve.MaxDragTorque * 1.1; + var maxTorque = engineDataFullLoadCurve.MaxTorque * 1.1; + + var speed = engineData.FullLoadCurves[0].RatedSpeed / gearboxGears[i].Ratio * gearboxGears[i + 1].Ratio; + + + upshift.Add(new ShiftPolygon.ShiftPolygonEntry(maxDragTorque, speed)); + upshift.Add(new ShiftPolygon.ShiftPolygonEntry(maxTorque, speed)); + } + return new ShiftPolygon(shiftLine.Downshift.ToList(), upshift); + } + + #endregion } } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/BaseShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/BaseShiftStrategy.cs index 54c5ba67a69ff5f5240fee5562a1f66d6b53513a..5b16a11e871be9edf6c83533c202ad3703800083 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/BaseShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/BaseShiftStrategy.cs @@ -29,12 +29,16 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ +using System.Collections.Generic; using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.Models.Simulation.DataBus; using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.OutputData; namespace TUGraz.VectoCore.Models.SimulationComponent.Impl @@ -65,6 +69,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl } + public abstract ShiftPolygon ComputeDeclarationShiftPolygon( + GearboxType gearboxType, int i, EngineFullLoadCurve engineDataFullLoadCurve, IList<ITransmissionInputData> gearboxGears, + CombustionEngineData engineData, double axlegearRatio, Meter dynamicTyreRadius); + protected MeterPerSquareSecond EstimateAccelerationForGear(uint gear, PerSecond gbxAngularVelocityOut) { if (gear == 0 || gear > ModelData.Gears.Count) { diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/CycleGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/CycleGearbox.cs index fc2b1789f86276f5099af39d08e040734b778abf..af2b47e81c381824b149c108f00f695e275b886a 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/CycleGearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/CycleGearbox.cs @@ -29,8 +29,10 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ +using System.Collections.Generic; using System.Linq; using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; @@ -40,6 +42,7 @@ using TUGraz.VectoCore.Models.Simulation; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.DataBus; using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.OutputData; using TUGraz.VectoCore.Utils; @@ -538,6 +541,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { get { throw new System.NotImplementedException(); } } + + public override ShiftPolygon ComputeDeclarationShiftPolygon( + GearboxType gearboxType, int i, EngineFullLoadCurve engineDataFullLoadCurve, IList<ITransmissionInputData> gearboxGears, + CombustionEngineData engineData, double axlegearRatio, Meter dynamicTyreRadius) + { + return null; + } } } } \ No newline at end of file diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index 66c5df00504b2a3fea9284a0871356d17f4e9cd7..64370389e5e9dd3f7388474bbf264af9c805670b 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -20,7 +20,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;BETA_RELEASE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> @@ -76,7 +76,8 @@ <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> - <DefineConstants>RELEASE_CANDIDATE</DefineConstants> + <DefineConstants> + </DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> @@ -205,7 +206,7 @@ <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\AMTShiftStrategyACEA.cs" /> <Compile Include="Models\SimulationComponent\Impl\ATGearbox.cs" /> <Compile Include="Models\SimulationComponent\Impl\ATShiftStrategy.cs" /> <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\AverageAccelerationTorqueLookup.cs" /> diff --git a/VectoCore/VectoCoreTest/FileIO/JsonReadTest.cs b/VectoCore/VectoCoreTest/FileIO/JsonReadTest.cs index 9c379daf88055cc24b9fc1bd42c6b256469b02b2..532e973f1a41a5c4b38629e0c2755b0a8bd17fc8 100644 --- a/VectoCore/VectoCoreTest/FileIO/JsonReadTest.cs +++ b/VectoCore/VectoCoreTest/FileIO/JsonReadTest.cs @@ -173,7 +173,7 @@ namespace TUGraz.VectoCore.Tests.FileIO } var gbxData = new EngineeringDataAdapter().CreateGearboxData(inputProvider, MockSimulationDataFactory.CreateEngineDataFromFile(@"TestData\Components\AT_GBX\Engine.veng", 0), 2.1, - 0.5.SI<Meter>(), VehicleCategory.RigidTruck); + 0.5.SI<Meter>(), VehicleCategory.RigidTruck, null); Assert.AreEqual(ratios.Length, gbxData.Gears.Count); // interpreted as gearbox with first and second gear using TC (due to gear ratios) @@ -197,7 +197,7 @@ namespace TUGraz.VectoCore.Tests.FileIO } var gbxData = new EngineeringDataAdapter().CreateGearboxData(inputProvider, MockSimulationDataFactory.CreateEngineDataFromFile(@"TestData\Components\AT_GBX\Engine.veng", 0), 2.1, - 0.5.SI<Meter>(), VehicleCategory.RigidTruck); + 0.5.SI<Meter>(), VehicleCategory.RigidTruck, null); Assert.AreEqual(ratios.Length, gbxData.Gears.Count); Assert.IsTrue(gbxData.Gears[1].HasLockedGear); @@ -223,7 +223,7 @@ namespace TUGraz.VectoCore.Tests.FileIO } var gbxData = new EngineeringDataAdapter().CreateGearboxData(inputProvider, MockSimulationDataFactory.CreateEngineDataFromFile(@"TestData\Components\AT_GBX\Engine.veng", 0), 2.1, - 0.5.SI<Meter>(), VehicleCategory.RigidTruck); + 0.5.SI<Meter>(), VehicleCategory.RigidTruck, null); Assert.AreEqual(ratios.Length, gbxData.Gears.Count); Assert.IsTrue(gbxData.Gears[1].HasLockedGear); @@ -248,7 +248,7 @@ namespace TUGraz.VectoCore.Tests.FileIO } var gbxData = new EngineeringDataAdapter().CreateGearboxData(inputProvider, MockSimulationDataFactory.CreateEngineDataFromFile(@"TestData\Components\AT_GBX\Engine.veng", 0), 2.1, - 0.5.SI<Meter>(), VehicleCategory.RigidTruck); + 0.5.SI<Meter>(), VehicleCategory.RigidTruck, null); Assert.AreEqual(ratios.Length, gbxData.Gears.Count); Assert.IsFalse(gbxData.Gears[1].HasLockedGear); @@ -275,7 +275,7 @@ namespace TUGraz.VectoCore.Tests.FileIO } var gbxData = new EngineeringDataAdapter().CreateGearboxData(inputProvider, MockSimulationDataFactory.CreateEngineDataFromFile(@"TestData\Components\AT_GBX\Engine.veng", 0), 2.1, - 0.5.SI<Meter>(), VehicleCategory.InterurbanBus); + 0.5.SI<Meter>(), VehicleCategory.InterurbanBus, null); Assert.AreEqual(ratios.Length, gbxData.Gears.Count); Assert.IsTrue(gbxData.Gears[1].HasLockedGear); @@ -302,7 +302,7 @@ namespace TUGraz.VectoCore.Tests.FileIO } var gbxData = new EngineeringDataAdapter().CreateGearboxData(inputProvider, MockSimulationDataFactory.CreateEngineDataFromFile(@"TestData\Components\AT_GBX\Engine.veng", 0), 2.1, - 0.5.SI<Meter>(), VehicleCategory.InterurbanBus); + 0.5.SI<Meter>(), VehicleCategory.InterurbanBus, null); Assert.AreEqual(ratios.Length, gbxData.Gears.Count); Assert.IsFalse(gbxData.Gears[1].HasLockedGear); diff --git a/VectoCore/VectoCoreTest/TestData/Integration/ShiftStrategyV2/CityBus_AT_FCOpt/ShiftParameters.vtcu b/VectoCore/VectoCoreTest/TestData/Integration/ShiftStrategyV2/CityBus_AT_FCOpt/ShiftParameters.vtcu index 0c7255967dd4891f96061a45f6da07b61eae68d2..45a662d2752baf4794649eba1128fe3b2b0adbb6 100644 --- a/VectoCore/VectoCoreTest/TestData/Integration/ShiftStrategyV2/CityBus_AT_FCOpt/ShiftParameters.vtcu +++ b/VectoCore/VectoCoreTest/TestData/Integration/ShiftStrategyV2/CityBus_AT_FCOpt/ShiftParameters.vtcu @@ -6,32 +6,8 @@ "FileVersion": 1 }, "Body": { - "StartSpeed": 8, - "StartAcceleration": 0.8, - "GearResidenceTime": 5, - "Dn_Tq99L_high_min_1": 0.4, - "Dn_Tq99L_high_min_2": 0.5, - "GearRangeUp": 3, - "GearRangeDown": 3, - "LookBackDriver": 4, - "DriverAccelerationLookBackInterval": 10, - "DriverAccelerationThresholdLow": 0.1, - "P_card_avg_threshold": 5000, - "P_card_curr_threshold": 1000, - "Diff_curr_targ_vel": 0.1, - "EngineSpeedHighDriveOffFactor": 1.05, "Rating_current_gear": 0.99, - "AccelerationReserveLookup": "AccelerationReserveLookup.csv", - "ShareTorque99L": "ShareTq99L.csv", - "PredictionDurationLookup": "PredictionTimeLookup.csv", - "ShareIdleLow": "ShareIdleLow.csv", - "ShareEngineHigh": "ShareEngineSpeedHigh.csv", - - "RatioEarlyUpshiftFC": 10, - "RatioEarlyDownshiftFC": 5, - - "LoadStageShiftLines": "", - "LoadStageThresoldsUp": "19.7;36.34;53.01;69.68;86.35", - "LoadStageThresoldsDown": "13.7;30.34;47.01;63.68;80.35", + "RatioEarlyUpshiftFC": 10, + "RatioEarlyDownshiftFC": 5 } } \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/TestData/Integration/ShiftStrategyV2/CityBus_AT_GSVoith/ShiftParameters.vtcu b/VectoCore/VectoCoreTest/TestData/Integration/ShiftStrategyV2/CityBus_AT_GSVoith/ShiftParameters.vtcu index 4266ff75be6252c7b05192ac81e69538b46f75df..d3fa50dbfa54e6963d04ebd6ca296cbdd328b9d1 100644 --- a/VectoCore/VectoCoreTest/TestData/Integration/ShiftStrategyV2/CityBus_AT_GSVoith/ShiftParameters.vtcu +++ b/VectoCore/VectoCoreTest/TestData/Integration/ShiftStrategyV2/CityBus_AT_GSVoith/ShiftParameters.vtcu @@ -6,32 +6,8 @@ "FileVersion": 1 }, "Body": { - "StartSpeed": 8, - "StartAcceleration": 0.8, - "GearResidenceTime": 5, - "Dn_Tq99L_high_min_1": 0.4, - "Dn_Tq99L_high_min_2": 0.5, - "GearRangeUp": 3, - "GearRangeDown": 3, - "LookBackDriver": 4, - "DriverAccelerationLookBackInterval": 10, - "DriverAccelerationThresholdLow": 0.1, - "P_card_avg_threshold": 5000, - "P_card_curr_threshold": 1000, - "Diff_curr_targ_vel": 0.1, - "EngineSpeedHighDriveOffFactor": 1.05, - "Rating_current_gear": 0.99, - "AccelerationReserveLookup": "AccelerationReserveLookup.csv", - "ShareTorque99L": "ShareTq99L.csv", - "PredictionDurationLookup": "PredictionTimeLookup.csv", - "ShareIdleLow": "ShareIdleLow.csv", - "ShareEngineHigh": "ShareEngineSpeedHigh.csv", - - "RatioEarlyUpshiftFC": 10, - "RatioEarlyDownshiftFC": 5, - - "LoadStageShiftLines": "GearshiftLinesVoith.vgsv", - "LoadStageThresoldsUp": "19.7;36.34;53.01;69.68;86.35", - "LoadStageThresoldsDown": "13.7;30.34;47.01;63.68;80.35", + "LoadStageShiftLines": "GearshiftLinesVoith.vgsv", + "LoadStageThresoldsUp": "19.7;36.34;53.01;69.68;86.35", + "LoadStageThresoldsDown": "13.7;30.34;47.01;63.68;80.35", } } \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs b/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs index 3ecd6a4ed55388373198f757f16d0050b72bb509..ae87d79fe8e5f0b42c61ed6c97e06036820abac9 100644 --- a/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs +++ b/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs @@ -62,7 +62,7 @@ namespace TUGraz.VectoCore.Tests.Utils var dao = new EngineeringDataAdapter(); var engineData = dao.CreateEngineData(engineInput, gearboxInput, new List<ITorqueLimitInputData>()); return dao.CreateGearboxData(gearboxInput, engineData, ((IAxleGearInputData)gearboxInput).Ratio, 0.5.SI<Meter>(), - VehicleCategory.RigidTruck); + VehicleCategory.RigidTruck, null); } }