diff --git a/VECTO/GUI/GearboxForm.Designer.vb b/VECTO/GUI/GearboxForm.Designer.vb index 2a30dc0a0a1726f8e14787a41d3dde403fbbf5ea..b5f2c27885587bbd0a1610f38f88d9e684c80b9f 100644 --- a/VECTO/GUI/GearboxForm.Designer.vb +++ b/VECTO/GUI/GearboxForm.Designer.vb @@ -81,11 +81,9 @@ Partial Class GearboxForm Me.Label2 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.TbTqResv = New System.Windows.Forms.TextBox() - Me.ChShiftInside = New System.Windows.Forms.CheckBox() Me.TbShiftTime = New System.Windows.Forms.TextBox() Me.Label12 = New System.Windows.Forms.Label() Me.Label13 = New System.Windows.Forms.Label() - Me.ChSkipGears = New System.Windows.Forms.CheckBox() Me.GroupBox2 = New System.Windows.Forms.GroupBox() Me.TbStartAcc = New System.Windows.Forms.TextBox() Me.Label11 = New System.Windows.Forms.Label() @@ -100,11 +98,11 @@ Partial Class GearboxForm Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.GroupBox3 = New System.Windows.Forms.GroupBox() - Me.BtTCShiftFileBrowse = New System.Windows.Forms.Button() - Me.LblTCShiftFile = New System.Windows.Forms.Label() - Me.TBTCShiftPolygon = New System.Windows.Forms.TextBox() Me.PnTC = New System.Windows.Forms.Panel() + Me.BtTCShiftFileBrowse = New System.Windows.Forms.Button() Me.Label17 = New System.Windows.Forms.Label() + Me.TBTCShiftPolygon = New System.Windows.Forms.TextBox() + Me.LblTCShiftFile = New System.Windows.Forms.Label() Me.Label18 = New System.Windows.Forms.Label() Me.Label15 = New System.Windows.Forms.Label() Me.TbTCinertia = New System.Windows.Forms.TextBox() @@ -121,6 +119,7 @@ Partial Class GearboxForm Me.Label32 = New System.Windows.Forms.Label() Me.PnInertiaTI = New System.Windows.Forms.Panel() Me.PicBox = New System.Windows.Forms.PictureBox() + Me.Label25 = New System.Windows.Forms.Label() Me.ToolStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -381,11 +380,9 @@ Partial Class GearboxForm ' Me.GrGearShift.Controls.Add(Me.GroupBox1) Me.GrGearShift.Controls.Add(Me.PnTorqRes) - Me.GrGearShift.Controls.Add(Me.ChShiftInside) Me.GrGearShift.Controls.Add(Me.TbShiftTime) Me.GrGearShift.Controls.Add(Me.Label12) Me.GrGearShift.Controls.Add(Me.Label13) - Me.GrGearShift.Controls.Add(Me.ChSkipGears) Me.GrGearShift.Controls.Add(Me.GroupBox2) Me.GrGearShift.Location = New System.Drawing.Point(12, 377) Me.GrGearShift.Name = "GrGearShift" @@ -489,19 +486,20 @@ Partial Class GearboxForm ' 'PnTorqRes ' + Me.PnTorqRes.Controls.Add(Me.Label25) Me.PnTorqRes.Controls.Add(Me.Label2) Me.PnTorqRes.Controls.Add(Me.Label4) Me.PnTorqRes.Controls.Add(Me.TbTqResv) - Me.PnTorqRes.Location = New System.Drawing.Point(230, 19) + Me.PnTorqRes.Location = New System.Drawing.Point(9, 20) Me.PnTorqRes.Name = "PnTorqRes" - Me.PnTorqRes.Size = New System.Drawing.Size(190, 32) + Me.PnTorqRes.Size = New System.Drawing.Size(426, 32) Me.PnTorqRes.TabIndex = 2 ' 'Label2 ' Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label2.AutoSize = True - Me.Label2.Location = New System.Drawing.Point(10, 9) + Me.Label2.Location = New System.Drawing.Point(18, 9) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(79, 13) Me.Label2.TabIndex = 0 @@ -511,7 +509,7 @@ Partial Class GearboxForm ' Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label4.AutoSize = True - Me.Label4.Location = New System.Drawing.Point(158, 9) + Me.Label4.Location = New System.Drawing.Point(272, 9) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(21, 13) Me.Label4.TabIndex = 0 @@ -520,26 +518,14 @@ Partial Class GearboxForm 'TbTqResv ' Me.TbTqResv.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TbTqResv.Location = New System.Drawing.Point(95, 6) + Me.TbTqResv.Location = New System.Drawing.Point(206, 6) Me.TbTqResv.Name = "TbTqResv" Me.TbTqResv.Size = New System.Drawing.Size(57, 20) Me.TbTqResv.TabIndex = 0 ' - 'ChShiftInside - ' - Me.ChShiftInside.AutoSize = True - Me.ChShiftInside.Checked = True - Me.ChShiftInside.CheckState = System.Windows.Forms.CheckState.Checked - Me.ChShiftInside.Location = New System.Drawing.Point(9, 27) - Me.ChShiftInside.Name = "ChShiftInside" - Me.ChShiftInside.Size = New System.Drawing.Size(195, 17) - Me.ChShiftInside.TabIndex = 0 - Me.ChShiftInside.Text = "Allow shift-up inside polygons (AMT)" - Me.ChShiftInside.UseVisualStyleBackColor = True - ' 'TbShiftTime ' - Me.TbShiftTime.Location = New System.Drawing.Point(325, 51) + Me.TbShiftTime.Location = New System.Drawing.Point(215, 52) Me.TbShiftTime.Name = "TbShiftTime" Me.TbShiftTime.Size = New System.Drawing.Size(57, 20) Me.TbShiftTime.TabIndex = 3 @@ -547,7 +533,7 @@ Partial Class GearboxForm 'Label12 ' Me.Label12.AutoSize = True - Me.Label12.Location = New System.Drawing.Point(388, 54) + Me.Label12.Location = New System.Drawing.Point(281, 55) Me.Label12.Name = "Label12" Me.Label12.Size = New System.Drawing.Size(18, 13) Me.Label12.TabIndex = 9 @@ -556,22 +542,12 @@ Partial Class GearboxForm 'Label13 ' Me.Label13.AutoSize = True - Me.Label13.Location = New System.Drawing.Point(227, 54) + Me.Label13.Location = New System.Drawing.Point(27, 55) Me.Label13.Name = "Label13" Me.Label13.Size = New System.Drawing.Size(92, 13) Me.Label13.TabIndex = 8 Me.Label13.Text = "Minimum shift time" ' - 'ChSkipGears - ' - Me.ChSkipGears.AutoSize = True - Me.ChSkipGears.Location = New System.Drawing.Point(9, 53) - Me.ChSkipGears.Name = "ChSkipGears" - Me.ChSkipGears.Size = New System.Drawing.Size(132, 17) - Me.ChSkipGears.TabIndex = 1 - Me.ChSkipGears.Text = "Skip Gears (MT, AMT)" - Me.ChSkipGears.UseVisualStyleBackColor = True - ' 'GroupBox2 ' Me.GroupBox2.Controls.Add(Me.TbStartAcc) @@ -693,35 +669,6 @@ Partial Class GearboxForm Me.GroupBox3.TabStop = False Me.GroupBox3.Text = "Torque Converter" ' - 'BtTCShiftFileBrowse - ' - Me.BtTCShiftFileBrowse.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.BtTCShiftFileBrowse.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon - Me.BtTCShiftFileBrowse.Location = New System.Drawing.Point(353, 104) - Me.BtTCShiftFileBrowse.Name = "BtTCShiftFileBrowse" - Me.BtTCShiftFileBrowse.Size = New System.Drawing.Size(24, 24) - Me.BtTCShiftFileBrowse.TabIndex = 5 - Me.BtTCShiftFileBrowse.TabStop = False - Me.BtTCShiftFileBrowse.UseVisualStyleBackColor = True - ' - 'LblTCShiftFile - ' - Me.LblTCShiftFile.AutoSize = True - Me.LblTCShiftFile.Location = New System.Drawing.Point(5, 78) - Me.LblTCShiftFile.Name = "LblTCShiftFile" - Me.LblTCShiftFile.Size = New System.Drawing.Size(172, 13) - Me.LblTCShiftFile.TabIndex = 5 - Me.LblTCShiftFile.Text = "Torque converter shift polygons file" - ' - 'TBTCShiftPolygon - ' - Me.TBTCShiftPolygon.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TBTCShiftPolygon.Location = New System.Drawing.Point(4, 104) - Me.TBTCShiftPolygon.Name = "TBTCShiftPolygon" - Me.TBTCShiftPolygon.Size = New System.Drawing.Size(343, 20) - Me.TBTCShiftPolygon.TabIndex = 37 - ' 'PnTC ' Me.PnTC.Controls.Add(Me.BtTCShiftFileBrowse) @@ -742,6 +689,17 @@ Partial Class GearboxForm Me.PnTC.Size = New System.Drawing.Size(402, 137) Me.PnTC.TabIndex = 36 ' + 'BtTCShiftFileBrowse + ' + Me.BtTCShiftFileBrowse.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.BtTCShiftFileBrowse.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon + Me.BtTCShiftFileBrowse.Location = New System.Drawing.Point(353, 104) + Me.BtTCShiftFileBrowse.Name = "BtTCShiftFileBrowse" + Me.BtTCShiftFileBrowse.Size = New System.Drawing.Size(24, 24) + Me.BtTCShiftFileBrowse.TabIndex = 5 + Me.BtTCShiftFileBrowse.TabStop = False + Me.BtTCShiftFileBrowse.UseVisualStyleBackColor = True + ' 'Label17 ' Me.Label17.AutoSize = True @@ -751,6 +709,24 @@ Partial Class GearboxForm Me.Label17.TabIndex = 0 Me.Label17.Text = "Torque converter characteristics file" ' + 'TBTCShiftPolygon + ' + Me.TBTCShiftPolygon.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.TBTCShiftPolygon.Location = New System.Drawing.Point(4, 104) + Me.TBTCShiftPolygon.Name = "TBTCShiftPolygon" + Me.TBTCShiftPolygon.Size = New System.Drawing.Size(343, 20) + Me.TBTCShiftPolygon.TabIndex = 37 + ' + 'LblTCShiftFile + ' + Me.LblTCShiftFile.AutoSize = True + Me.LblTCShiftFile.Location = New System.Drawing.Point(5, 78) + Me.LblTCShiftFile.Name = "LblTCShiftFile" + Me.LblTCShiftFile.Size = New System.Drawing.Size(172, 13) + Me.LblTCShiftFile.TabIndex = 5 + Me.LblTCShiftFile.Text = "Torque converter shift polygons file" + ' 'Label18 ' Me.Label18.AutoSize = True @@ -906,6 +882,16 @@ Partial Class GearboxForm Me.PicBox.TabIndex = 48 Me.PicBox.TabStop = False ' + 'Label25 + ' + Me.Label25.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Label25.AutoSize = True + Me.Label25.Location = New System.Drawing.Point(294, 9) + Me.Label25.Name = "Label25" + Me.Label25.Size = New System.Drawing.Size(129, 13) + Me.Label25.TabIndex = 1 + Me.Label25.Text = "(Early shift-up, Skip gears)" + ' 'GearboxForm ' Me.AcceptButton = Me.ButOK @@ -1000,8 +986,6 @@ Partial Class GearboxForm Friend WithEvents TbShiftTime As TextBox Friend WithEvents Label12 As Label Friend WithEvents Label13 As Label - Friend WithEvents ChSkipGears As CheckBox - Friend WithEvents ChShiftInside As CheckBox Friend WithEvents CmOpenFile As ContextMenuStrip Friend WithEvents OpenWithToolStripMenuItem As ToolStripMenuItem Friend WithEvents ShowInFolderToolStripMenuItem As ToolStripMenuItem @@ -1041,4 +1025,5 @@ Partial Class GearboxForm Friend WithEvents BtTCShiftFileBrowse As Button Friend WithEvents LblTCShiftFile As Label Friend WithEvents TBTCShiftPolygon As TextBox + Friend WithEvents Label25 As System.Windows.Forms.Label End Class diff --git a/VECTO/GUI/GearboxForm.vb b/VECTO/GUI/GearboxForm.vb index 25b5f15f876e9fa6119fcecde42f922c626992a7..d4b91a3c0ee24c02171427ab2905b516bb60089c 100644 --- a/VECTO/GUI/GearboxForm.vb +++ b/VECTO/GUI/GearboxForm.vb @@ -266,13 +266,11 @@ Public Class GearboxForm If(gear.MaxTorque Is Nothing, "", gear.MaxTorque.ToGUIFormat()))) Next - ChSkipGears.Checked = gearbox.SkipGears TbTqResv.Text = gearbox.TorqueReserve.ToGUIFormat() TbShiftTime.Text = gearbox.ShiftTime.ToGUIFormat() TbTqResvStart.Text = gearbox.StartTorqueReserve.ToGUIFormat() TbStartSpeed.Text = gearbox.StartSpeed.ToGUIFormat() TbStartAcc.Text = gearbox.StartAcceleration.ToGUIFormat() - ChShiftInside.Checked = gearbox.EarlyShiftUp Dim torqueConverter As ITorqueConverterEngineeringInputData = gearbox.TorqueConverter If torqueConverter Is Nothing Then @@ -358,12 +356,10 @@ Public Class GearboxForm Next gearbox.TorqueResv = TbTqResv.Text.ToDouble(0) - gearbox.SkipGears = ChSkipGears.Checked gearbox.ShiftTime = TbShiftTime.Text.ToDouble(0) gearbox.TorqueResvStart = TbTqResvStart.Text.ToDouble(0) gearbox.StartSpeed = TbStartSpeed.Text.ToDouble(0) gearbox.StartAcc = TbStartAcc.Text.ToDouble(0) - gearbox.ShiftInside = ChShiftInside.Checked gearbox.Type = CType(CbGStype.SelectedValue, GearboxType) @@ -442,18 +438,6 @@ Public Class GearboxForm Change() End Sub - Private Sub ChSkipGears_CheckedChanged(sender As Object, e As EventArgs) _ - Handles ChSkipGears.CheckedChanged - CheckEnableTorqRes() - Change() - End Sub - - Private Sub ChShiftInside_CheckedChanged(sender As Object, e As EventArgs) _ - Handles ChShiftInside.CheckedChanged - CheckEnableTorqRes() - Change() - End Sub - Private Sub TbTqResv_TextChanged(sender As Object, e As EventArgs) Handles TbTqResv.TextChanged Change() End Sub @@ -487,15 +471,6 @@ Public Class GearboxForm End Sub - Private Sub CheckEnableTorqRes() - If ChShiftInside.Checked Or ChSkipGears.Checked Then - PnTorqRes.Enabled = True - Else - PnTorqRes.Enabled = False - End If - End Sub - - #End Region 'Save and close @@ -515,8 +490,6 @@ Public Class GearboxForm Change() - ChShiftInside.Enabled = (gStype.EarlyShiftGears()) - ChSkipGears.Enabled = (gStype.SkipGears()) 'ChTCon.Enabled = (GStype.AutomaticTransmission()) PnTC.Enabled = gStype.AutomaticTransmission() End Sub diff --git a/VECTO/Input Files/Gearbox.vb b/VECTO/Input Files/Gearbox.vb index 2070b4bc1e0b0abcad3eb5a50c3509f202846f8b..44c79d2cb5108e024ed50dd1576f3c97fb81bdf7 100644 --- a/VECTO/Input Files/Gearbox.vb +++ b/VECTO/Input Files/Gearbox.vb @@ -442,11 +442,6 @@ Public Class Gearbox End Get End Property - Public ReadOnly Property EarlyShiftUp As Boolean Implements IGearboxEngineeringInputData.EarlyShiftUp - Get - Return ShiftInside - End Get - End Property Public ReadOnly Property TorqueReserve As Double Implements IGearboxEngineeringInputData.TorqueReserve Get @@ -495,12 +490,6 @@ Public Class Gearbox End Get End Property - Public ReadOnly Property IGearboxEngineeringInputData_SkipGears As Boolean _ - Implements IGearboxEngineeringInputData.SkipGears - Get - Return SkipGears - End Get - End Property Public ReadOnly Property IGearboxEngineeringInputData_StartSpeed As MeterPerSecond _ Implements IGearboxEngineeringInputData.StartSpeed diff --git a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs index 538ed4e621c1cc252cb7fc9c17b13da03ea84143..38ac7cb95e5d790a0dff44589ee74be51f7e2087 100644 --- a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs +++ b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs @@ -144,11 +144,11 @@ namespace TUGraz.VectoCommon.InputData /// </summary> Second ShiftTime { get; } - /// <summary> - /// P083 - /// cf. VECTO Input Parameters.xlsx - /// </summary> - bool EarlyShiftUp { get; } + ///// <summary> + ///// P083 + ///// cf. VECTO Input Parameters.xlsx + ///// </summary> + //bool EarlyShiftUp { get; } /// <summary> /// P085 @@ -175,11 +175,11 @@ namespace TUGraz.VectoCommon.InputData /// </summary> double StartTorqueReserve { get; } - /// <summary> - /// P084 - /// cf. VECTO Input Parameters.xlsx - /// </summary> - bool SkipGears { get; } + ///// <summary> + ///// P084 + ///// cf. VECTO Input Parameters.xlsx + ///// </summary> + //bool SkipGears { get; } /// <summary> /// P090, P091, P092, P127 diff --git a/VectoCommon/VectoCommon/Models/GearboxType.cs b/VectoCommon/VectoCommon/Models/GearboxType.cs index ab5fec0399973b393be4a108a4e12b81316d85bd..d3af018a83094a540ed986900ff714ed225c8720 100644 --- a/VectoCommon/VectoCommon/Models/GearboxType.cs +++ b/VectoCommon/VectoCommon/Models/GearboxType.cs @@ -81,34 +81,6 @@ namespace TUGraz.VectoCommon.Models return type == GearboxType.MT || type == GearboxType.AMT; } - public static bool EarlyShiftGears(this GearboxType type) - { - switch (type) { - case GearboxType.MT: - return false; - case GearboxType.AMT: - return true; - case GearboxType.ATSerial: - case GearboxType.ATPowerSplit: - return false; - } - return false; - } - - public static bool SkipGears(this GearboxType type) - { - switch (type) { - case GearboxType.MT: - return true; - case GearboxType.AMT: - return true; - case GearboxType.ATSerial: - case GearboxType.ATPowerSplit: - return false; - } - return false; - } - public static Second TractionInterruption(this GearboxType type) { switch (type) { diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs index a4820e35cdfdad2b986d07ef7169463519855c6e..8a613bd43e79a90270a1cd3e3e2cd4bf25cf39ad 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs @@ -181,8 +181,6 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter retVal.Inertia = DeclarationData.Gearbox.Inertia; retVal.TractionInterruption = retVal.Type.TractionInterruption(); - retVal.SkipGears = retVal.Type.SkipGears(); - retVal.EarlyShiftUp = retVal.Type.EarlyShiftGears(); retVal.TorqueReserve = DeclarationData.Gearbox.TorqueReserve; retVal.StartTorqueReserve = DeclarationData.Gearbox.TorqueReserveStart; @@ -215,7 +213,6 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter ShiftPolygon = shiftPolygon, MaxTorque = gear.MaxTorque, Ratio = gear.Ratio, - }); }).ToDictionary(kv => kv.Key, kv => kv.Value); diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs index dacd50e5cba58e5fe03be89d1ab4311283c222ef..0b822b99af926b0a838ee6ec6261b2841cb08cd1 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs @@ -134,16 +134,14 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter retVal.Inertia = gearbox.Inertia; retVal.TractionInterruption = gearbox.TractionInterruption; - retVal.SkipGears = gearbox.SkipGears; - retVal.EarlyShiftUp = gearbox.EarlyShiftUp; retVal.TorqueReserve = gearbox.TorqueReserve; retVal.StartTorqueReserve = gearbox.StartTorqueReserve; retVal.ShiftTime = gearbox.ShiftTime; retVal.StartSpeed = gearbox.StartSpeed; retVal.StartAcceleration = gearbox.StartAcceleration; - var gearDifferenceRatio = gearbox.Type.AutomaticTransmission() && gearbox.Gears.Count > 2 ? - gearbox.Gears[0].Ratio / gearbox.Gears[1].Ratio + var gearDifferenceRatio = gearbox.Type.AutomaticTransmission() && gearbox.Gears.Count > 2 + ? gearbox.Gears[0].Ratio / gearbox.Gears[1].Ratio : 1.0; var gears = new Dictionary<uint, GearData>(); diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs index 1f7ac5ff1b2e87c08760b99644330ae9de62147a..54445ef1374de3b06d57695c991a1f00168a25cd 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs @@ -67,22 +67,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data [Required, Range(0, 0.5)] public double TorqueReserve { get; internal set; } - /// <summary> - /// Indicates if gears can be skipped in Gear Shift Strategy. - /// </summary> - public bool SkipGears { get; internal set; } - /// <summary> /// Gets the minimum time between shifts. /// </summary> [Required, SIRange(0, 5)] public Second ShiftTime { get; internal set; } - /// <summary> - /// True if the gearbox should do early up shifts. - /// </summary> - public bool EarlyShiftUp { get; internal set; } - /// <summary> /// [%] (0-1) The starting torque reserve for finding the starting gear after standstill. /// </summary> diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs index 5ecbcdbea42130319c53e0d9611be7d22c799a1d..2b972c6492eb8e150c01c4f9ecf579ca81110828 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs @@ -52,10 +52,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public AMTShiftStrategy(GearboxData data, IDataBus dataBus) : base(data, dataBus) { PreviousGear = 1; - Data.EarlyShiftUp = true; - Data.SkipGears = true; + EarlyShiftUp = true; + SkipGears = true; } + private bool SpeedTooLowForEngine(uint gear, PerSecond outAngularSpeed) { return (outAngularSpeed * Data.Gears[gear].Ratio).IsSmaller(DataBus.EngineIdleSpeed); @@ -231,7 +232,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl // upshift while (IsAboveUpShiftCurve(currentGear, inTorque, inAngularVelocity)) { currentGear++; - if (!Data.SkipGears) { + if (!SkipGears) { break; } @@ -245,7 +246,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl } // early up shift to higher gear --------------------------------------- - if (Data.EarlyShiftUp && currentGear < Data.Gears.Count) { + if (EarlyShiftUp && currentGear < Data.Gears.Count) { // try if next gear would provide enough torque reserve var tryNextGear = currentGear + 1; var tmpGear = Gearbox.Gear; @@ -276,7 +277,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl // down shift while (IsBelowDownShiftCurve(currentGear, inTorque, inAngularVelocity)) { currentGear--; - if (!Data.SkipGears) { + if (!SkipGears) { break; } var tmpGear = Gearbox.Gear; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/MTShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/MTShiftStrategy.cs index 2dc8dad844ee75a31fe97e05952ec3530681f8b3..a2354622e4b6b209c5ff293440362f873a6cf9d3 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/MTShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/MTShiftStrategy.cs @@ -38,8 +38,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { public MTShiftStrategy(GearboxData data, IDataBus bus) : base(data, bus) { - Data.EarlyShiftUp = false; - Data.SkipGears = true; + EarlyShiftUp = false; + SkipGears = true; } } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs index 4d25a7d51f23594ef048e7d02554bf336583e317..052b34689e2040ffdd09b6f8ef49559d7f54e9f7 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs @@ -47,6 +47,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl protected GearboxData Data; protected Gearbox _gearbox; + protected bool SkipGears; + + protected bool EarlyShiftUp; + protected ShiftStrategy(GearboxData data, IDataBus dataBus) { DataBus = dataBus; diff --git a/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs b/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs index b53a86c0bc97f8ae68f698c3e7e6560cb0d6eba5..a3483a762faf17e2c14ce8815d63ba02c4f782dd 100644 --- a/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs +++ b/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs @@ -114,7 +114,6 @@ namespace TUGraz.VectoCore.Tests.Integration StartSpeed = 2.SI<MeterPerSecond>(), StartAcceleration = 0.6.SI<MeterPerSquareSecond>(), StartTorqueReserve = 0.2, - SkipGears = false, TorqueReserve = 0.2, DownshiftAfterUpshiftDelay = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay, UpshiftAfterDownshiftDelay = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay, diff --git a/VectoCore/VectoCoreTest/Integration/CoachAdvancedAuxPowertrain.cs b/VectoCore/VectoCoreTest/Integration/CoachAdvancedAuxPowertrain.cs index 3018ddcc37b1068f3175d9f4cb4141a43996d7be..19109ea9132d59fb57266f32aa2fb6cc3815cccc 100644 --- a/VectoCore/VectoCoreTest/Integration/CoachAdvancedAuxPowertrain.cs +++ b/VectoCore/VectoCoreTest/Integration/CoachAdvancedAuxPowertrain.cs @@ -128,7 +128,6 @@ namespace TUGraz.VectoCore.Tests.Integration StartSpeed = 2.SI<MeterPerSecond>(), StartAcceleration = 0.6.SI<MeterPerSquareSecond>(), StartTorqueReserve = 0.2, - SkipGears = true, TorqueReserve = 0.2, DownshiftAfterUpshiftDelay = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay, UpshiftAfterDownshiftDelay = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay, diff --git a/VectoCore/VectoCoreTest/Integration/CoachPowerTrain.cs b/VectoCore/VectoCoreTest/Integration/CoachPowerTrain.cs index 549d9d70cb022f715673b560d3b1e6265568a0f6..edf306665d2aea84e4cdcd71de5b25c9ffbc1b40 100644 --- a/VectoCore/VectoCoreTest/Integration/CoachPowerTrain.cs +++ b/VectoCore/VectoCoreTest/Integration/CoachPowerTrain.cs @@ -131,7 +131,6 @@ namespace TUGraz.VectoCore.Tests.Integration StartSpeed = 2.SI<MeterPerSecond>(), StartAcceleration = 0.6.SI<MeterPerSquareSecond>(), StartTorqueReserve = 0.2, - SkipGears = true, TorqueReserve = 0.2, DownshiftAfterUpshiftDelay = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay, UpshiftAfterDownshiftDelay = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay, diff --git a/VectoCore/VectoCoreTest/Integration/Truck40tPowerTrain.cs b/VectoCore/VectoCoreTest/Integration/Truck40tPowerTrain.cs index 10a8ec888a00f89542499485920945f1a43a3d18..14cc03dcbade62be959b61b27550efd1cf3e58f6 100644 --- a/VectoCore/VectoCoreTest/Integration/Truck40tPowerTrain.cs +++ b/VectoCore/VectoCoreTest/Integration/Truck40tPowerTrain.cs @@ -149,8 +149,6 @@ namespace TUGraz.VectoCore.Tests.Integration StartSpeed = 2.SI<MeterPerSecond>(), TorqueReserve = 0.2, StartTorqueReserve = 0.2, - SkipGears = true, - EarlyShiftUp = true, DownshiftAfterUpshiftDelay = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay, UpshiftAfterDownshiftDelay = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay, UpshiftMinAcceleration = DeclarationData.Gearbox.UpshiftMinAcceleration