diff --git a/VECTO/GUI/F_GBX.Designer.vb b/VECTO/GUI/F_GBX.Designer.vb index 04ffc73c4ac4440a5f89dde09b2cef6f67520515..3a53f946f4b9918603db1b3ca36f648dab3b3306 100644 --- a/VECTO/GUI/F_GBX.Designer.vb +++ b/VECTO/GUI/F_GBX.Designer.vb @@ -107,6 +107,16 @@ Partial Class F_GBX Me.Label32 = New System.Windows.Forms.Label() Me.PnInertiaTI = New System.Windows.Forms.Panel() Me.PicBox = New System.Windows.Forms.PictureBox() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.Label19 = New System.Windows.Forms.Label() + Me.Label20 = New System.Windows.Forms.Label() + Me.Label21 = New System.Windows.Forms.Label() + Me.Label22 = New System.Windows.Forms.Label() + Me.Label23 = New System.Windows.Forms.Label() + Me.Label24 = New System.Windows.Forms.Label() + Me.tbDownshiftAfterUpshift = New System.Windows.Forms.TextBox() + Me.tbUpshiftAfterDownshift = New System.Windows.Forms.TextBox() + Me.tbUpshiftMinAcceleration = New System.Windows.Forms.TextBox() Me.ToolStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -119,6 +129,7 @@ Partial Class F_GBX Me.GroupBox4.SuspendLayout() Me.PnInertiaTI.SuspendLayout() CType(Me.PicBox, System.ComponentModel.ISupportInitialize).BeginInit() + Me.GroupBox1.SuspendLayout() Me.SuspendLayout() ' 'ToolStrip1 @@ -203,7 +214,7 @@ Partial Class F_GBX 'StatusStrip1 ' Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.LbStatus}) - Me.StatusStrip1.Location = New System.Drawing.Point(0, 595) + Me.StatusStrip1.Location = New System.Drawing.Point(0, 684) Me.StatusStrip1.Name = "StatusStrip1" Me.StatusStrip1.Size = New System.Drawing.Size(877, 22) Me.StatusStrip1.SizingGrip = False @@ -220,7 +231,7 @@ Partial Class F_GBX ' Me.ButCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.ButCancel.Location = New System.Drawing.Point(790, 569) + Me.ButCancel.Location = New System.Drawing.Point(790, 658) Me.ButCancel.Name = "ButCancel" Me.ButCancel.Size = New System.Drawing.Size(75, 23) Me.ButCancel.TabIndex = 7 @@ -230,7 +241,7 @@ Partial Class F_GBX 'ButOK ' Me.ButOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButOK.Location = New System.Drawing.Point(709, 569) + Me.ButOK.Location = New System.Drawing.Point(709, 658) Me.ButOK.Name = "ButOK" Me.ButOK.Size = New System.Drawing.Size(75, 23) Me.ButOK.TabIndex = 6 @@ -369,6 +380,7 @@ Partial Class F_GBX ' 'GrGearShift ' + Me.GrGearShift.Controls.Add(Me.GroupBox1) Me.GrGearShift.Controls.Add(Me.PnTorqRes) Me.GrGearShift.Controls.Add(Me.ChShiftInside) Me.GrGearShift.Controls.Add(Me.TbShiftTime) @@ -378,7 +390,7 @@ Partial Class F_GBX Me.GrGearShift.Controls.Add(Me.GroupBox2) Me.GrGearShift.Location = New System.Drawing.Point(12, 377) Me.GrGearShift.Name = "GrGearShift" - Me.GrGearShift.Size = New System.Drawing.Size(441, 182) + Me.GrGearShift.Size = New System.Drawing.Size(441, 291) Me.GrGearShift.TabIndex = 3 Me.GrGearShift.TabStop = False Me.GrGearShift.Text = "Gear shift parameters" @@ -479,7 +491,7 @@ Partial Class F_GBX Me.GroupBox2.Controls.Add(Me.Label8) Me.GroupBox2.Controls.Add(Me.Label5) Me.GroupBox2.Controls.Add(Me.Label7) - Me.GroupBox2.Location = New System.Drawing.Point(6, 77) + Me.GroupBox2.Location = New System.Drawing.Point(6, 186) Me.GroupBox2.Name = "GroupBox2" Me.GroupBox2.Size = New System.Drawing.Size(429, 99) Me.GroupBox2.TabIndex = 4 @@ -783,13 +795,107 @@ Partial Class F_GBX Me.PicBox.TabIndex = 48 Me.PicBox.TabStop = False ' + 'GroupBox1 + ' + Me.GroupBox1.BackColor = System.Drawing.Color.AliceBlue + Me.GroupBox1.Controls.Add(Me.tbUpshiftMinAcceleration) + Me.GroupBox1.Controls.Add(Me.tbUpshiftAfterDownshift) + Me.GroupBox1.Controls.Add(Me.tbDownshiftAfterUpshift) + Me.GroupBox1.Controls.Add(Me.Label24) + Me.GroupBox1.Controls.Add(Me.Label23) + Me.GroupBox1.Controls.Add(Me.Label22) + Me.GroupBox1.Controls.Add(Me.Label21) + Me.GroupBox1.Controls.Add(Me.Label20) + Me.GroupBox1.Controls.Add(Me.Label19) + Me.GroupBox1.Location = New System.Drawing.Point(6, 82) + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.Size = New System.Drawing.Size(429, 100) + Me.GroupBox1.TabIndex = 10 + Me.GroupBox1.TabStop = False + Me.GroupBox1.Text = "Shift Strategy Parameters" + ' + 'Label19 + ' + Me.Label19.AutoSize = True + Me.Label19.Location = New System.Drawing.Point(20, 25) + Me.Label19.Name = "Label19" + Me.Label19.Size = New System.Drawing.Size(137, 13) + Me.Label19.TabIndex = 0 + Me.Label19.Text = "Downshift afer upshift delay" + ' + 'Label20 + ' + Me.Label20.AutoSize = True + Me.Label20.Location = New System.Drawing.Point(20, 48) + Me.Label20.Name = "Label20" + Me.Label20.Size = New System.Drawing.Size(137, 13) + Me.Label20.TabIndex = 1 + Me.Label20.Text = "Upshift afer downshift delay" + ' + 'Label21 + ' + Me.Label21.AutoSize = True + Me.Label21.Location = New System.Drawing.Point(20, 74) + Me.Label21.Name = "Label21" + Me.Label21.Size = New System.Drawing.Size(146, 13) + Me.Label21.TabIndex = 2 + Me.Label21.Text = "Min. acceleration after upshift" + ' + 'Label22 + ' + Me.Label22.AutoSize = True + Me.Label22.Location = New System.Drawing.Point(275, 25) + Me.Label22.Name = "Label22" + Me.Label22.Size = New System.Drawing.Size(18, 13) + Me.Label22.TabIndex = 3 + Me.Label22.Text = "[s]" + ' + 'Label23 + ' + Me.Label23.AutoSize = True + Me.Label23.Location = New System.Drawing.Point(275, 48) + Me.Label23.Name = "Label23" + Me.Label23.Size = New System.Drawing.Size(18, 13) + Me.Label23.TabIndex = 4 + Me.Label23.Text = "[s]" + ' + 'Label24 + ' + Me.Label24.AutoSize = True + Me.Label24.Location = New System.Drawing.Point(275, 74) + Me.Label24.Name = "Label24" + Me.Label24.Size = New System.Drawing.Size(34, 13) + Me.Label24.TabIndex = 5 + Me.Label24.Text = "[m/s²]" + ' + 'tbDownshiftAfterUpshift + ' + Me.tbDownshiftAfterUpshift.Location = New System.Drawing.Point(209, 20) + Me.tbDownshiftAfterUpshift.Name = "tbDownshiftAfterUpshift" + Me.tbDownshiftAfterUpshift.Size = New System.Drawing.Size(57, 20) + Me.tbDownshiftAfterUpshift.TabIndex = 6 + ' + 'tbUpshiftAfterDownshift + ' + Me.tbUpshiftAfterDownshift.Location = New System.Drawing.Point(209, 45) + Me.tbUpshiftAfterDownshift.Name = "tbUpshiftAfterDownshift" + Me.tbUpshiftAfterDownshift.Size = New System.Drawing.Size(57, 20) + Me.tbUpshiftAfterDownshift.TabIndex = 7 + ' + 'tbUpshiftMinAcceleration + ' + Me.tbUpshiftMinAcceleration.Location = New System.Drawing.Point(209, 71) + Me.tbUpshiftMinAcceleration.Name = "tbUpshiftMinAcceleration" + Me.tbUpshiftMinAcceleration.Size = New System.Drawing.Size(57, 20) + Me.tbUpshiftMinAcceleration.TabIndex = 8 + ' 'F_GBX ' Me.AcceptButton = Me.ButOK Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.ButCancel - Me.ClientSize = New System.Drawing.Size(877, 617) + Me.ClientSize = New System.Drawing.Size(877, 706) Me.Controls.Add(Me.PicBox) Me.Controls.Add(Me.PnInertiaTI) Me.Controls.Add(Me.GroupBox4) @@ -831,6 +937,8 @@ Partial Class F_GBX Me.PnInertiaTI.ResumeLayout(False) Me.PnInertiaTI.PerformLayout() CType(Me.PicBox, System.ComponentModel.ISupportInitialize).EndInit() + Me.GroupBox1.ResumeLayout(False) + Me.GroupBox1.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -908,4 +1016,14 @@ Partial Class F_GBX Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label18 As System.Windows.Forms.Label Friend WithEvents ColumnHeader6 As System.Windows.Forms.ColumnHeader + Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox + Friend WithEvents tbUpshiftMinAcceleration As System.Windows.Forms.TextBox + Friend WithEvents tbUpshiftAfterDownshift As System.Windows.Forms.TextBox + Friend WithEvents tbDownshiftAfterUpshift As System.Windows.Forms.TextBox + Friend WithEvents Label24 As System.Windows.Forms.Label + Friend WithEvents Label23 As System.Windows.Forms.Label + Friend WithEvents Label22 As System.Windows.Forms.Label + Friend WithEvents Label21 As System.Windows.Forms.Label + Friend WithEvents Label20 As System.Windows.Forms.Label + Friend WithEvents Label19 As System.Windows.Forms.Label End Class diff --git a/VECTO/GUI/F_GBX.vb b/VECTO/GUI/F_GBX.vb index c6aa5f2f5a1844fe0fb2e25ed65c7ab930a0abb7..cb3ea2b2e67e3d1222f786528e58f98d1577ab25 100644 --- a/VECTO/GUI/F_GBX.vb +++ b/VECTO/GUI/F_GBX.vb @@ -87,6 +87,10 @@ Public Class F_GBX Me.TbStartSpeed.Text = cDeclaration.StartSpeed Me.TbStartAcc.Text = cDeclaration.StartAcc + tbUpshiftMinAcceleration.Text = cDeclaration.UpshiftMinAcceleration + tbDownshiftAfterUpshift.Text = cDeclaration.DownshiftAfterUpshiftDelay + tbUpshiftAfterDownshift.Text = cDeclaration.UpshiftAfterDownshiftDelay + For Each lv0 In Me.LvGears.Items lv0.SubItems(4).Text = "-" Next @@ -269,6 +273,10 @@ Public Class F_GBX Me.TbTCrefrpm.Text = GBX0.TCrefrpm Me.TbTCinertia.Text = GBX0.TCinertia + tbUpshiftMinAcceleration.Text = GBX0.UpshiftMinAcceleration + tbDownshiftAfterUpshift.Text = GBX0.DownshiftAfterUpshift + tbUpshiftAfterDownshift.Text = GBX0.UpshiftAfterDownshift + If CType(GBX0.gs_Type, Integer) <= Me.CbGStype.Items.Count - 1 Then Me.CbGStype.SelectedIndex = CType(GBX0.gs_Type, Integer) Else @@ -340,6 +348,10 @@ Public Class F_GBX GBX0.TCrefrpm = fTextboxToNumString(Me.TbTCrefrpm.Text) GBX0.TCinertia = fTextboxToNumString(Me.TbTCinertia.Text) + GBX0.DownshiftAfterUpshift = fTextboxToNumString(tbDownshiftAfterUpshift.Text) + GBX0.UpshiftAfterDownshift = fTextboxToNumString(tbUpshiftAfterDownshift.Text) + GBX0.UpshiftMinAcceleration = fTextboxToNumString(tbUpshiftMinAcceleration.Text) + If Not GBX0.SaveFile Then MsgBox("Cannot safe to " & file, MsgBoxStyle.Critical) Return False @@ -980,4 +992,15 @@ Public Class F_GBX #End Region + + Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GroupBox1.Enter + End Sub + + Public Sub New() + + ' Dieser Aufruf ist für den Designer erforderlich. + InitializeComponent() + + ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. + End Sub End Class diff --git a/VECTO/Input Files/cGBX.vb b/VECTO/Input Files/cGBX.vb index 8cb0603aa3e46c0870b95de62826dbcea85e04c0..657b3e1ab8daa5adb5cff143a1d6c2119c659e36 100644 --- a/VECTO/Input Files/cGBX.vb +++ b/VECTO/Input Files/cGBX.vb @@ -74,6 +74,9 @@ Public Class cGBX Private MyFileList As List(Of String) Public SavedInDeclMode As Boolean + Public UpshiftMinAcceleration As Single + Public DownshiftAfterUpshift As String + Public UpshiftAfterDownshift As Single Public Function CreateFileList() As Boolean @@ -207,6 +210,10 @@ Public Class cGBX dic0.Add("Inertia", TCinertia) dic.Add("TorqueConverter", dic0) + dic.Add("DownshiftAferUpshiftDelay", DownshiftAfterUpshift) + dic.Add("UpshiftAfterDownshiftDelay", UpshiftAfterDownshift) + dic.Add("UpshiftMinAcceleration", UpshiftMinAcceleration) + JSON.Content.Add("Body", dic) Return JSON.WriteFile(sFilePath) @@ -238,7 +245,7 @@ Public Class cGBX GbxInertia = JSON.Content("Body")("Inertia") TracIntrSi = JSON.Content("Body")("TracInt") - i = - 1 + i = -1 For Each dic In JSON.Content("Body")("Gears") i += 1 @@ -285,6 +292,24 @@ Public Class cGBX gs_Type = GearboxConv(JSON.Content("Body")("GearboxType").ToString) + If JSON.Content("Body")("UpshiftMinAcceleration") Is Nothing Then + UpshiftMinAcceleration = 0.1 + Else + UpshiftMinAcceleration = JSON.Content("Body")("UpshiftMinAcceleration") + End If + If JSON.Content("Body")("DownshiftAferUpshiftDelay") Is Nothing Then + DownshiftAfterUpshift = 10 + Else + DownshiftAfterUpshift = JSON.Content("Body")("DownshiftAferUpshiftDelay") + End If + + If JSON.Content("Body")("UpshiftAfterDownshiftDelay") Is Nothing Then + UpshiftAfterDownshift = 10 + Else + UpshiftAfterDownshift = JSON.Content("Body")("UpshiftAfterDownshiftDelay") + End If + + If JSON.Content("Body")("TorqueConverter") Is Nothing Then TCon = False Else @@ -323,6 +348,10 @@ Public Class cGBX gs_StartSpeed = cDeclaration.StartSpeed gs_StartAcc = cDeclaration.StartAcc + UpshiftAfterDownshift = 10 + DownshiftAfterUpshift = 10 + UpshiftMinAcceleration = 0.1 + TCon = (gs_Type = tGearbox.Automatic) For i = 1 To GearCount() @@ -356,7 +385,7 @@ Public Class cGBX TCnu.Clear() TCmu.Clear() TCtorque.Clear() - TCdim = - 1 + TCdim = -1 Try Do While Not file.EndOfFile @@ -483,11 +512,11 @@ Public Class cGBX End If nuMin = 1 - nuMax = Math.Min(TCnu(TCdim), nUout/ENG.Nidle) + nuMax = Math.Min(TCnu(TCdim), nUout / ENG.Nidle) Else nuMin = Math.Max(nUout / rpmLimit, TCnu(0)) - nuMax = Math.Min(TCnuMax, nUout/ENG.Nidle) + nuMax = Math.Min(TCnuMax, nUout / ENG.Nidle) End If If nuMax <= nuMin Then @@ -502,7 +531,6 @@ Public Class cGBX Loop - Do iOptPassed = -1 @@ -529,35 +557,34 @@ Public Class cGBX nUin = nUout / nu - 'AA-TB - 'Recalculate for Advanced Auxiliaries. + 'AA-TB + 'Recalculate for Advanced Auxiliaries. - mAAUX_Global.ClutchEngaged = (Gear > 0) + mAAUX_Global.ClutchEngaged = (Gear > 0) - mAAUX_Global.Idle = False'(Gear = 0 And Not Pplus And Not Pminus) + mAAUX_Global.Idle = False '(Gear = 0 And Not Pplus And Not Pminus) - mAAUX_Global.InNeutral = (Gear = 0) + mAAUX_Global.InNeutral = (Gear = 0) - 'Driveline Power = required power at clutch = power at wheels plus powertrain losses - '[kW] - '**** RL 7-7-15 **** - mAAUX_Global.EngineDrivelinePower = PeOut + 'Driveline Power = required power at clutch = power at wheels plus powertrain losses + '[kW] + '**** RL 7-7-15 **** + mAAUX_Global.EngineDrivelinePower = PeOut - '[1/min] - mAAUX_Global.EngineSpeed = nU + '[1/min] + mAAUX_Global.EngineSpeed = nU - '[Nm] (using Power => Torque conversion) - mAAUX_Global.EngineDrivelineTorque = nPeToM(EngineSpeed, EngineDrivelinePower) + '[Nm] (using Power => Torque conversion) + mAAUX_Global.EngineDrivelineTorque = nPeToM(EngineSpeed, EngineDrivelinePower) - 'Motoring power (< 0 !!!) - '[kW] - '** MULTIPLIED BY - TO GET POSITIVE VALUE - mAAUX_Global.EngineMotoringPower = - FLD(Gear).Pdrag(EngineSpeed) - - 'Additional aux power from driving cycle (optional user input) - '[kW] - mAAUX_Global.PreExistingAuxPower = MODdata.Vh.Padd(t) + 'Motoring power (< 0 !!!) + '[kW] + '** MULTIPLIED BY - TO GET POSITIVE VALUE + mAAUX_Global.EngineMotoringPower = -FLD(Gear).Pdrag(EngineSpeed) + 'Additional aux power from driving cycle (optional user input) + '[kW] + mAAUX_Global.PreExistingAuxPower = MODdata.Vh.Padd(t) 'MinMax @@ -597,7 +624,9 @@ Public Class cGBX iMin = iDim End If If McalcRatio(iDim) > McalcRatMax Then McalcRatMax = McalcRatio(iDim) - If (McalcRatio(iDim) > 1 AndAlso McalcRatio(iDim - 1) < 1) OrElse (McalcRatio(iDim) < 1 AndAlso McalcRatio(iDim - 1) > 1) Then + If _ + (McalcRatio(iDim) > 1 AndAlso McalcRatio(iDim - 1) < 1) OrElse + (McalcRatio(iDim) < 1 AndAlso McalcRatio(iDim - 1) > 1) Then iOptPassed = iDim End If Else @@ -664,9 +693,9 @@ Public Class cGBX nu = nuList(iMin) mu = fTCmu(nu) - TCnUin = nUout/nu - TCMout = fTCtorque(nu, TCnUin)*mu - TCMin = TCMout/mu + TCnUin = nUout / nu + TCMout = fTCtorque(nu, TCnUin) * mu + TCMin = TCMout / mu TCnUout = nUout TC_mu = mu @@ -699,9 +728,9 @@ Public Class cGBX MODdata.ModErrors.TCextrapol = "nu= " & nu & " [n_out/n_in]" End If - lbInt: +lbInt: 'Interpolation - Return (nu - TCnu(i - 1))*(TCmu(i) - TCmu(i - 1))/(TCnu(i) - TCnu(i - 1)) + TCmu(i - 1) + Return (nu - TCnu(i - 1)) * (TCmu(i) - TCmu(i - 1)) / (TCnu(i) - TCnu(i - 1)) + TCmu(i - 1) End Function Private Function fTCtorque(ByVal nu As Single, ByVal nUin As Single) As Single @@ -725,11 +754,11 @@ Public Class cGBX MODdata.ModErrors.TCextrapol = "nu= " & nu & " [n_out/n_in]" End If - lbInt: +lbInt: 'Interpolation - M0 = (nu - TCnu(i - 1))*(TCtorque(i) - TCtorque(i - 1))/(TCnu(i) - TCnu(i - 1)) + TCtorque(i - 1) + M0 = (nu - TCnu(i - 1)) * (TCtorque(i) - TCtorque(i - 1)) / (TCnu(i) - TCnu(i - 1)) + TCtorque(i - 1) - Return M0*(nUin/TCrefrpm)^2 + Return M0 * (nUin / TCrefrpm) ^ 2 End Function Public Function GSinit() As Boolean @@ -860,7 +889,7 @@ Public Class cGBX GBmap0 = New cDelaunayMap GBmap0.DualMode = True - l = 0 'Nur für Fehler-Ausgabe + l = 0 'Nur für Fehler-Ausgabe Do While Not file.EndOfFile l += 1 line = file.ReadLine @@ -897,20 +926,20 @@ Public Class cGBX If GBX.IsTCgear(i) Then - GetrEff(i) = - 1 + GetrEff(i) = -1 Else EffSum = 0 Anz = 0 - dnU = (2/3)*(ENG.Nrated - ENG.Nidle)/10 + dnU = (2 / 3) * (ENG.Nrated - ENG.Nidle) / 10 nU = ENG.Nidle + dnU Do While nU <= ENG.Nrated - dM = nPeToM(nU, (2/3)*FLD(i).Pfull(nU)/10) - M_in = nPeToM(nU, (1/3)*FLD(i).Pfull(nU)) + dM = nPeToM(nU, (2 / 3) * FLD(i).Pfull(nU) / 10) + M_in = nPeToM(nU, (1 / 3) * FLD(i).Pfull(nU)) Do While M_in <= nPeToM(nU, FLD(i).Pfull(nU)) @@ -918,7 +947,7 @@ Public Class cGBX P_Loss = IntpolPeLossFwd(i, nU, P_In, False) - EffSum += (P_In - P_Loss)/P_In + EffSum += (P_In - P_Loss) / P_In Anz += 1 @@ -928,8 +957,8 @@ Public Class cGBX 'Axle P_In -= P_Loss - P_Loss = IntpolPeLossFwd(0, nU/GBX.Igetr(i), P_In, False) - EffDiffSum += (P_In - P_Loss)/P_In + P_Loss = IntpolPeLossFwd(0, nU / GBX.Igetr(i), P_In, False) + EffDiffSum += (P_In - P_Loss) / P_In AnzDiff += 1 If MODdata.ModErrors.TrLossMapExtr <> "" Then @@ -938,8 +967,8 @@ Public Class cGBX WorkerMsg(tMsgID.Err, "nU_In(GB)=" & nU & " [1/min]", MsgSrc) WorkerMsg(tMsgID.Err, "M_In(GB)=" & MinG & " [Nm]", MsgSrc) WorkerMsg(tMsgID.Err, "P_Loss(GB)=" & plossG & " [kW]", MsgSrc) - WorkerMsg(tMsgID.Err, "nU_In(axle)=" & CStr(nU/Igetr(i)) & " [1/min]", MsgSrc) - WorkerMsg(tMsgID.Err, "M_In(axle)=" & CStr(nPeToM(nU/Igetr(i), P_In)) & " [Nm]", MsgSrc) + WorkerMsg(tMsgID.Err, "nU_In(axle)=" & CStr(nU / Igetr(i)) & " [1/min]", MsgSrc) + WorkerMsg(tMsgID.Err, "M_In(axle)=" & CStr(nPeToM(nU / Igetr(i), P_In)) & " [Nm]", MsgSrc) WorkerMsg(tMsgID.Err, "P_Loss(axle)=" & P_Loss & " [kW]", MsgSrc) Return False End If @@ -956,7 +985,7 @@ Public Class cGBX Return False End If - GetrEff(i) = EffSum/Anz + GetrEff(i) = EffSum / Anz End If @@ -968,7 +997,7 @@ Public Class cGBX Next If Not GetrEffDef(0) Then - GetrEff(0) = EffDiffSum/AnzDiff + GetrEff(0) = EffDiffSum / AnzDiff End If @@ -1002,9 +1031,9 @@ Public Class cGBX If GetrEffDef(Gear) Or (Approx AndAlso GetrEff(Gear) > 0) Then If PeOut > 0 Then - PeIn = PeOut/GetrEff(Gear) + PeIn = PeOut / GetrEff(Gear) Else - PeIn = PeOut*GetrEff(Gear) + PeIn = PeOut * GetrEff(Gear) End If Ploss = PeIn - PeOut @@ -1021,10 +1050,10 @@ Public Class cGBX 'If error: try extrapolation 'Search for the nearest Map point - AbMin = ((GBmap.ptList(0).X - nU)^2 + (GBmap.ptList(0).Y - nPeToM(nU, PeOut))^2)^0.5 + AbMin = ((GBmap.ptList(0).X - nU) ^ 2 + (GBmap.ptList(0).Y - nPeToM(nU, PeOut)) ^ 2) ^ 0.5 iMin = 0 For i = 1 To GBmap.ptDim - Ab = ((GBmap.ptList(i).X - nU)^2 + (GBmap.ptList(i).Y - nPeToM(nU, PeOut))^2)^0.5 + Ab = ((GBmap.ptList(i).X - nU) ^ 2 + (GBmap.ptList(i).Y - nPeToM(nU, PeOut)) ^ 2) ^ 0.5 If Ab < AbMin Then AbMin = Ab iMin = i @@ -1038,8 +1067,8 @@ Public Class cGBX If PeOutX > 0 Then If PeIn > 0 Then - WG = PeOutX/PeIn - PeIn = PeOut/WG + WG = PeOutX / PeIn + PeIn = PeOut / WG Ploss = PeIn - PeOut Else @@ -1057,14 +1086,14 @@ Public Class cGBX If PeIn > 0 Then - WG = (PeIn - (PeIn - PeOutX))/PeIn - PeIn = PeOut/WG + WG = (PeIn - (PeIn - PeOutX)) / PeIn + PeIn = PeOut / WG Ploss = PeIn - PeOut ElseIf PeIn < 0 Then - WG = PeIn/PeOutX - PeIn = PeOut*WG + WG = PeIn / PeOutX + PeIn = PeOut * WG Ploss = PeIn - PeOut Else @@ -1137,9 +1166,9 @@ Public Class cGBX If GetrEffDef(Gear) Or (Approx AndAlso GetrEff(Gear) > 0) Then If PeIn > 0 Then - PeOut = PeIn*GetrEff(Gear) + PeOut = PeIn * GetrEff(Gear) Else - PeOut = PeIn/GetrEff(Gear) + PeOut = PeIn / GetrEff(Gear) End If Else @@ -1155,10 +1184,10 @@ Public Class cGBX 'If error: try extrapolation 'Search for the nearest Map-point - AbMin = ((GBmap.ptList(0).X - nU)^2 + (GBmap.ptList(0).Z - nPeToM(nU, PeIn))^2)^0.5 + AbMin = ((GBmap.ptList(0).X - nU) ^ 2 + (GBmap.ptList(0).Z - nPeToM(nU, PeIn)) ^ 2) ^ 0.5 iMin = 0 For i = 1 To GBmap.ptDim - Ab = ((GBmap.ptList(i).X - nU)^2 + (GBmap.ptList(i).Z - nPeToM(nU, PeIn))^2)^0.5 + Ab = ((GBmap.ptList(i).X - nU) ^ 2 + (GBmap.ptList(i).Z - nPeToM(nU, PeIn)) ^ 2) ^ 0.5 If Ab < AbMin Then AbMin = Ab iMin = i @@ -1173,7 +1202,7 @@ Public Class cGBX If PeInX > 0 Then 'Drivetrain => Drivetrain - WG = PeOut/PeInX + WG = PeOut / PeInX Else @@ -1199,14 +1228,14 @@ Public Class cGBX Else 'Drag => Drag - WG = PeInX/PeOut + WG = PeInX / PeOut End If End If 'Calculate efficiency with PeIn for original PeOut - PeOut = PeIn*WG + PeOut = PeIn * WG MODdata.ModErrors.TrLossMapExtr = "Gear= " & GrTxt & ", nU= " & nU.ToString("0.00") & " [1/min], MeIn=" & nPeToM(nU, PeIn).ToString("0.00") & " [Nm] (fwd)" @@ -1302,8 +1331,8 @@ Public Class cGBX Public gs_TqDown As New List(Of Single) Public gs_nUup As New List(Of Single) Public gs_nUdown As New List(Of Single) - Private gs_Dup As Integer = - 1 - Private gs_Ddown As Integer = - 1 + Private gs_Dup As Integer = -1 + Private gs_Ddown As Integer = -1 Public Sub New(ByVal Path As String, ByVal Gear As Integer) Filepath = Path diff --git a/VECTO/cDeclaration.vb b/VECTO/cDeclaration.vb index 8337c819845f689052a03f3715b032be513613e3..d251182b3e3f6c10b3fc5411333b4eff3f10d8e7 100644 --- a/VECTO/cDeclaration.vb +++ b/VECTO/cDeclaration.vb @@ -76,6 +76,12 @@ Public Class cDeclaration Private VCDVvehClassParam As Dictionary(Of String, List(Of Single)) + Public Const UpshiftAfterDownshiftDelay As Single = 10 + + Public Const DownshiftAfterUpshiftDelay As Single = 10 + + Public Const UpshiftMinAcceleration As Single = 0.1 + Public Function VCDVparamPerCat(ByVal VehCat As tVehCat) As List(Of Single) Select Case VehCat Case tVehCat.Citybus, tVehCat.Coach, tVehCat.InterurbanBus